On Friday, 14 August 2015 at 04:17:25 UTC, TheHamster wrote:


assert(@@myObj.Do(3).Do(@).Do(@2) == 9);



If what you want is to omit the object during the call chain, you can use with statement to mimic this feature, though not as compact as you suggested:

```
import std.stdio;
class MyClass {
  int run(int x) { return x + 2; }
}
void main() {
  auto ob = new MyClass();
  int res;
  with (ob) {
    run(3);
    run(4);
    run(5);
  }
}
```

Reply via email to