Function Currying

Walter Bright newshound at digitalmars.com
Tue Nov 14 21:10:23 PST 2006


Hasan Aljudy wrote:
> 
> 
> Brad Roberts wrote:
>> The net is a truly wonderful resource:
>>
>> http://en.wikipedia.org/wiki/Curried_function
> 
> I've read that a while ago, but it doesn't make much of a sense. Why 
> would anyone need such a thing?
> My original question was, is it something that everyone is supposed to 
> already know its meaning and uses?

It's handy when you want to 'save' a command for future use, such as 
pushing it onto an undo/redo stack. Being able to encapsulate the 
arguments into just a function call make this particularly useful.



More information about the Digitalmars-d mailing list