Lesson plan
Currying
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\times Y)\to Z that takes two arguments, one from X and one from Y, and produces objects in 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\to Z. The family is arranged so that for each object x in X, there is exactly one function f_x , such that for any y in Y , f_x(y) = f(x,y) . In this example, \mbox{curry} itself becomes a function that takes f as an argument, and returns a function that maps each x to f_x. The proper notation for expressing this is verbose. The function f belongs to the set of functions (X\times Y)\to Z. Meanwhile, f_x belongs to the set of functions Y\to Z. Thus, something that maps x to f_x will be of the type X\to [Y\to Z]. With this notation, \mbox{curry} is a function that takes objects from the first set, and returns objects in the second set, and so one writes \mbox{curry}:[(X\times Y)\to Z]\to (X\to [Y\to Z]). This is a somewhat informal example; more precise definitions of what is meant by "object" and "function" are given below.…
Article summary
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\times Y)\to Z that takes two arguments, one from X and one from Y, and produces objects in 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\to Z. The family is arranged so that for each object x in X, there is exactly one function f_x , such that for any y in Y , f_x(y) = f(x,y) . In this example, \mbox{curry} itself becomes a function that takes f as an argument, and returns a function that maps each x to f_x. The proper notation for expressing this is verbose. The function f belongs to the set of functions (X\times Y)\to Z. Meanwhile, f_x belongs to the set of functions Y\to Z. Thus, something that maps x to f_x will be of the type X\to [Y\to Z]. With this notation, \mbox{curry} is a function that takes objects from the first set, and returns objects in the second set, and so one writes \mbox{curry}:[(X\times Y)\to Z]\to (X\to [Y\to Z]). This is a somewhat informal example; more precise definitions of what is meant by "object" and "function" are given below.…
Key claims
No claims recorded.
Discussion questions
- Summarise the article in your own words. Which single claim would you verify first, and why?
- Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
- If two sources disagreed about one of these facts, what would you need in order to trust one over the other?
Bibliography
No sources recorded.
Key claims and bibliography are generated from the same tracked claims and sources as the article page.