Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeLatest imagesSearchRegisterLog in

 

 An alternative approach to handling functions with multiple

Go down 
AuthorMessage
jancancook




Posts : 1136
Join date : 2011-01-02

An alternative approach to handling functions with multiple Empty
PostSubject: An alternative approach to handling functions with multiple   An alternative approach to handling functions with multiple Icon_minitimeThu Nov 10, 2011 9:06 pm

An alternative approach to handling functions with multiple arguments is to transform them into a chain of functions that each takes a single argument. For instance, one can interpret Add(3,5) to mean "first produce a function that adds 3 to its argument, and then apply the 'Add 3' function to 5". This transformation is called currying: Add 3 is curry(Add) applied to 3. There is a bijection between the function spaces CA×B and (CB)A.
When working with curried functions it is customary to use prefix notation with function application considered left-associative, since juxtaposition of multiple arguments—as in (ƒ x y)—naturally maps to evaluation of a curried function. Conversely, the → and ⟼ symbols are considered to be right-associative, so that curried functions may be defined by a notation such as ƒ: Z → Z → Z = x ⟼ y ⟼ x·y


mold test kit Michigan
breitling replica
Back to top Go down
 
An alternative approach to handling functions with multiple
Back to top 
Page 1 of 1
 Similar topics
-
» Multiple translations exist of the fifth/sixth commandment; the Hebrew

Permissions in this forum:You cannot reply to topics in this forum
 :: Community Discussion :: Gaming Chat-
Jump to: