请输入您要查询的字词:

 

单词 Currying
释义

currying


Currying is the technique of emulating multiple-parameteredfunctions with higher-order functions. The notion is that a functionof n arguments can be thought of as a function of 1 argument thatmaps to a function of n-1 arguments. A curried function is afunction represented by currying, e.g.

f:A(BC)

For conciseness, the mapping operator is usuallyconsidered right-associative, so one could drop the parentheses in theexpression above and write f:ABC instead.

In contrast, an uncurried function is usually specified as amapping from a Cartesian product, such as

f:(A×B)C.

The term currying is derived from the name of Haskell Curry, a20th-century logician. However, Curry was not the first person todiscover this notion, as it was first introduced by Gottlob Frege in1893 and expanded by Moses Schönfinkel in the 1920s. Hence thenotion is sometimes referred to as schönfinkeling.

From the perspective of category theoryMathworldPlanetmathPlanetmathPlanetmathPlanetmath, currying can be thought of asexploiting the fact that -×B and Hom(B,-) are adjointfunctorsMathworldPlanetmathPlanetmathPlanetmath on 𝐒𝐞𝐭. That is, for each set B, there is a naturalequivalence

ν:Hom𝐒𝐞𝐭(-×B,-)Hom𝐒𝐞𝐭(-,Hom(B,-))

defined by sending a map f:(A×B)C to the mapνf:AHom(B,C). For each aA, νf(a):BC is the map defined by νf(a)(b)=f(a,b).

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/5 0:31:05