On 06/24/2010 07:37 PM, bearophile wrote:
Graham Fawcett:If this were a real curry, you would write it like this: int fun(int a, int b) { return a + b; } assert(curry!(fun)(5)(6) == 11);Right. Better to change the name.
I think it would be even better to redefine curry to do actual currying.
Regarding std.functional, are the HOF adjoin(), compose() and pipe() useful? I don't think I'll use compose() or pipe(). If not enough people find them useful, then they can be removed.
I'm finding them quite useful, particularly in conjunction with e.g. map. Andrei
