binding arbitrary function arguments

Thomas thomas.h at ya.com
Wed Jun 27 16:46:53 PDT 2007


> > Is there a "good" way to bind an arbitrary function argument?
> 
> Yes! Use std.bind:
> http://www.digitalmars.com/d/phobos/std_bind.html
> 
Thanks for the suggestion.
Actually I was aware of std.bind. But it does not seem to be capable of binding more than 10 arguments. 

Well, before I get told that I probably shouldn't use more than ten arguments I should maybe mention that I'm principally interested in learning D. That is I'd like to know if and how this general, "unlimited" binding can be done in D.
(For all practical purposes I agree that it's likely not relevant - but for understanding and learning the language it may be.)

Thomas






More information about the Digitalmars-d-learn mailing list