FACTOID # 129: ‘Dollar’ is the most common currency name, followed by ‘franc,’ ‘pound,’ ‘dinar,’ ‘peso,’ and ‘rupee.’
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Currying" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Currying

In computer science, currying, invented by Moses Schönfinkel and Gottlob Frege, is the technique of transforming a function that takes multiple arguments into a function that takes a single argument (the other arguments having been specified by the curry). This article is about the dish. ... Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ... Moses Schönfinkel, also known as Moisei Isaievich Sheinfinkel Шейнфинкель (September 4, 1889 Ekaterinoslav (now Dnipropetrovsk, Ukraine) – 1942, Moscow) was a Jewish/Soviet logician and mathematician. ... Friedrich Ludwig Gottlob Frege (8 November 1848, Wismar – 26 July 1925, IPA: ) was a German mathematician who became a logician and philosopher. ... In computer science, a subroutine (function, procedure, or subprogram) is a sequence of code which performs a specific task, as part of a larger program, and is grouped as one, or more, statement blocks; such code is sometimes collected into software libraries. ... A parameter is a variable which can be accepted by a subroutine. ...

Contents

Nomenclature

The name "currying", coined by Christopher Strachey in 1967, is a reference to logician Haskell Curry. An alternative name, Schönfinkelisation, has been proposed. [1] Christopher Strachey (1916–1975) was a British computer scientist. ... Haskell Brooks Curry (September 12, 1900, Millis, Massachusetts - September 1, 1982, State College, Pennsylvania) was an American mathematician and logician. ...


Definition

Given a function f of type  f colon (X times Y) to Z , then currying it makes a function  mbox{curry}(f) colon X to (Y to Z) . That is, curry(f) takes an argument of type X and returns a function of type  Y to Z . Uncurrying is the reverse transformation.


Intuitively, currying says "if you fix some arguments, you get a function of the remaining arguments". For example, if function div stands for the curried form of the division operation x / y, then div with the parameter x fixed at 1 is another function: the same as the function inv that returns the multiplicative inverse of its argument, defined by inv(y) = 1 / y. A parameter is a variable which can be accepted by a subroutine. ...


The practical motivation for currying is that very often the functions obtained by supplying some but not all of the arguments to a curried function are useful; for example, many languages have a function or operator similar to plus_one. Currying makes it easy to define these functions.


Some programming languages have built-in syntactic support for currying, where certain multi-argument functions are expanded to their curried form; notable examples are ML and Haskell. Any language that supports closures can be used to write curried functions. A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... ML is a general-purpose functional programming language developed by Robin Milner and others in the late 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM. Historically, ML stands for metalanguage as it was conceived to develop proof tactics in the LCF theorem prover (the language of... Haskell is a standardized purely functional programming language with non-strict semantics, named after the logician Haskell Curry. ... In computer science, a closure is a function that is evaluated in an environment containing one or more bound variables. ...


Mathematical view

In theoretical computer science, currying provides a way to study functions with multiple arguments in very simple theoretical models such as the lambda calculus in which functions only take a single argument. Computer science (informally, CS or compsci) is, in its most general sense, the study of computation and information processing, both in hardware and in software. ... The lambda calculus is a formal system designed to investigate function definition, function application, and recursion. ...


When viewed in a set-theoretic light, currying becomes the theorem that the set A^{Btimes C} of functions from Btimes C to A, and the set (AB)C of functions from C to the set of functions from B to A, are isomorphic. Look up theorem in Wiktionary, the free dictionary. ... In mathematics, an isomorphism (in Greek isos = equal and morphe = shape) is a kind of interesting mapping between objects. ...


In category theory, currying can be found in the universal property of an exponential object, which gives rise to the following adjunction in cartesian closed categories: There is a natural isomorphism between the morphisms from a binary product  f colon (X times Y) to Z and the morphisms to an exponential object  g colon X to Z^Y . In other words, currying is the statement that product and Hom are adjoint functors; this is the key property of being a Cartesian closed category. In mathematics, category theory deals in an abstract way with mathematical structures and relationships between them. ... In various branches of mathematics, certain constructions are frequently defined or characterised by an abstract property which requires the existence of a unique morphism under certain conditions. ... In mathematics, specifically in category theory, an exponential object is the categorical equivalent of a function space in set theory. ... In mathematics, adjoint functors are pairs of functors which stand in a particular relationship with one another. ... In category theory, a category is cartesian closed if, roughly speaking, any morphism defined on a product of two objects can be naturally identified with a morphism defined on one of the factors. ... In category theory, an abstract branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i. ... In mathematics, an isomorphism (in Greek isos = equal and morphe = shape) is a kind of mapping between objects, devised by Eilhard Mitscherlich, which shows a relation between two properties or operations. ... In mathematics, a morphism is an abstraction of a structure-preserving mapping between two mathematical structures. ... In category theory, one defines products to generalize constructions such as the cartesian product of sets, the product of groups, the product of rings and the product of topological spaces. ... In mathematics, specifically in category theory, Hom-sets, i. ... In mathematics, adjoint functors are pairs of functors which stand in a particular relationship with one another. ... In category theory, a category is cartesian closed if, roughly speaking, any morphism defined on a product of two objects can be naturally identified with a morphism defined on one of the factors. ...


See also

In computer programming, lazy evaluation is a technique that attempts to delay computation of expressions until the results of the computation are known to be needed. ... In computer science, a closure is a function that is evaluated in an environment containing one or more bound variables. ... In computability theory the smn theorem, (also called the translation lemma or parameter theorem) is a basic result about programming languages, abstractly called Gödel numberings, first given by Stephen Cole Kleene. ...

References

  1. ^ I. Heim and A. Kratzer (1998). Semantics in Generative Grammar. Blackwell.

External links

Look up currying in Wiktionary, the free dictionary.

  Results from FactBites:
 
PlanetMath: currying (146 words)
Currying is the technique of emulating multiple-parametered functions with higher-order functions.
The term currying is derived from the name of Haskell Curry, a 20th century logician.
This is version 3 of currying, born on 2002-03-29, modified 2004-05-25.
[Python-Dev] PEP 309, function currying (452 words)
Currying is a way of transforming a function so that instead of accepting all its arguments at once it accepts just the first, returning a function which accepts just the second, returning a function which accepts just the third, and so on.
Then currying is the function transformer C such that - when f is a function of no arguments, C(f) = f(); - when f is a function of at least one argument, C(f) is the 1-argument function taking y1 to C(f[y1]).
Note that currying a no-argument function yields not a function but a constant; currying a 1-argument function yields the same function; currying any function with at least one argument yields a function that takes exactly one argument.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.