tsalm wrote:
Hello,

How to implement an object that can do this :
myClass.add(something)(otherthings)(thisToo);

Is it possible ?

TIA,
TSalm

Something like this might work:

class MyClass{
   int[] stuff;
   alias add opCall;
   MyClass add(int k){
      stuff ~= k;
      return this;
   }
}

Reply via email to