|
|
Line 1: |
Line 1: |
| =Currying= | | ==Introduction to Ruby== |
| | |
| Currying is a programming technique that transforms a function with multiple arguments into a series of single argument functions. It is the ability to convert a single function with ''n'' arguments into ''n'' functions with single argument each.
| |
| Currying is a basically a mathematical concept applied in several areas of computer science.
| |
| | |
|
| |
| | |
| | |
| ==Discovery and Naming== | |
| | |
| The currying technique was discovered by Moses Schönfinkel[http://en.wikipedia.org/wiki/Moses_Sch%C3%B6nfinkel]. Is was rediscovered by mathematician Haskell Curry[http://en.wikipedia.org/wiki/Haskell_Curry].
| |
| | |
| Christopher Strachey[http://en.wikipedia.org/wiki/Christopher_Strachey] coined the term "currying" in 1967, after Haskell Curry[http://en.wikipedia.org/wiki/Haskell_Curry]. However, it has been proposed to call this technique "Schönfinkelisation", in reference to its original discoverer Moses Schönfinkel[http://en.wikipedia.org/wiki/Moses_Sch%C3%B6nfinkel].
| |
| | |
| ==Definition==
| |
| | |
| "Given a function f of type , currying it makes a function . That is, takes an argument of type and returns a function of type"
| |
| | |
|
| |
|
| =Currying vs Partial Function Application= | | =Currying vs Partial Function Application= |
Revision as of 18:26, 26 September 2011
Introduction to Ruby
Currying vs Partial Function Application
Currying is often mistaken to Partial Function Application. The difference between the two techniques
See Also
External Links
References