Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Currying
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Motivation== Currying provides a way for working with functions that take multiple arguments, and using them in frameworks where functions might take only one argument. For example, some [[#Definition|analytical techniques]] can only be applied to [[function (mathematics)|function]]s with a single argument. Practical functions frequently take more arguments than this. [[Gottlob Frege|Frege]] showed that it was sufficient to provide solutions for the single argument case, as it was possible to transform a function with multiple arguments into a chain of single-argument functions instead. This transformation is the process now known as currying.<ref>{{cite web |author= |date=November 2002 |editor-last=Hutton |editor-first=Graham |editor2-last=Jones |editor2-first=Mark P. |title=Frequently Asked Questions for comp.lang.functional, 3. Technical topics, 3.2. Currying |url=http://www.cs.nott.ac.uk/~gmh/faq.html#currying |url-status= |archive-url= |archive-date= |work=University of Nottingham Computer Science}}</ref> All "ordinary" functions that might typically be encountered in [[mathematical analysis]] or in [[computer programming]] can be curried. However, there are categories in which currying is not possible; the most general categories which allow currying are the [[closed monoidal category|closed monoidal categories]]. Some [[programming language]]s almost always use curried functions to achieve multiple arguments; notable examples are [[ML (programming language)|ML]] and [[Haskell]], where in both cases all functions have exactly one argument. This property is inherited from [[lambda calculus]], where multi-argument functions are usually represented in curried form. Currying is related to, but not the same as [[partial application]].<ref name="lambda-the-ultimate"/><ref name="uncarved"/> In practice, the programming technique of [[Closure (computer programming)|closures]] can be used to perform partial application and a kind of currying, by hiding arguments in an environment that travels with the curried function.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Currying
(section)
Add topic