Currying
Transforming a function in such a way that it only takes a single argument
Nº Q1144925 ★★
Uncommon · Knowledge
Currying
Transforming a function in such a way that it only takes a single argument
In mathematics and computer science, currying (named after Haskell Curry) is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument. In the prototypical example, one begins with a function f : ( X × Y ) → Z {\displaystyle f:(X\times Y)\to Z} that takes two arguments, one from X {\displaystyle X} and one from Y , {\displaystyle Y,} and produces objects in Z . {\displaystyle Z.} The curried form of this function treats the first argument as a parameter, so as t...
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
In mathematics and computer science, currying (named after Haskell Curry) is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument. In the prototypical example, one begins with a function f : ( X × Y ) → Z {\displaystyle f:(X\times Y)\to Z} that takes two arguments, one from X {\displaystyle X} and one from Y , {\displaystyle Y,} and produces objects in Z . {\displaystyle Z.} The curried form of this function treats the first argument as a parameter, so as to create a family of functions f x : Y → Z . {\displaystyle f_{x}:Y\to Z.} The family is arranged so that for each object x {\displaystyle x} in X , {\displaystyle X,} there is exactly one function f x {\displaystyle f_{x}} , such that for any y {\displaystyle y} in Y {\displaystyle Y} , f x ( y ) = f ( x , y ) {\displaystyle f_{x}(y)=f(x,y)} . In this example, curry {\displaystyle {\mbox{curry}}} itself becomes a function that takes f {\displaystyle f} as an argument, and returns a function that maps each x {\displaystyle x} to f x . {\displaystyle f_{x}.} The proper notation for expressing this is verbose. The function f {\displaystyle f} belongs to the set of functions ( X × Y ) → Z . {\displaystyle (X\times Y)\to Z.} Meanwhile, f x {\displaystyle f_{x}} belongs to the set of functions Y → Z . {\displaystyle Y\to Z.} Thus, something that maps x {\displaystyle x} to f x {\displaystyle f_{x}} will be of the type X → [ Y → Z ] . {\displaystyle X\to [Y\to Z].} With this notation, curry {\displaystyle {\mbox{curry}}} is a function that takes objects from the first set, and returns objects in the second set, and...
Text: Wikipédia, CC BY-SA 4.0. ·