[phobos] D std.bind

Andrei Alexandrescu andrei at erdani.com
Thu Jun 17 10:29:56 PDT 2010


Jason Spencer wrote:
> Andrei Alexandrescu <andrei at ...> writes:
>> I wrote a curry in std.functional which I think could be a good starting 
>> point.
> 
> I'm new to D syntax, but if I read that right, std.curry just gives you
> an alias to a function call of two variables that fills in one for
> you.  Deprecating bind would still leave holes for:
> 
> - Currying an arbitrary length parameter list
> - storing a delegate to the curried function
> - composing curries (could be replaced by previous 2 if done in a certain way)
> - binding at arbitrary parameter indexes

All of these are much easier done with delegate literals.

Andrei


More information about the phobos mailing list