Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, currying a function that takes three arguments creates a nested unary function , so that the code gives the same value as the code or called in sequence, In a more mathematical language, a function that takes two arguments, one from and one from , and produces outputs in by currying is translated into a function that takes a single argument from and produces as outputs functions from to This is a natural one-to-one correspondence between these two types of functions, so that the sets together with functions between them form a . The currying of a function with more than two arguments can then be defined by induction. Currying is related to, but not the same as, partial application. Currying is useful in both practical and theoretical settings. In functional programming languages, and many others, it provides a way of automatically managing how arguments are passed to functions and exceptions. In theoretical computer science, it provides a way to study functions with multiple arguments in simpler theoretical models which provide only one argument. The most general setting for the strict notion of currying and uncurrying is in the , which underpins a vast generalization of the Curry–Howard correspondence of proofs and programs to a correspondence with many other structures, including quantum mechanics, cobordisms and string theory. It was introduced by Gottlob Frege, developed by Moses Schönfinkel, and further developed by Haskell Curry. Uncurrying is the dual transformation to currying, and can be seen as a form of defunctionalization. It takes a function whose return value is another function , and yields a new function that takes as parameters the arguments for both and , and returns, as a result, the application of and subsequently, , to those arguments. The process can be iterated.
Jian Wang, Olivier Schneider, Yiming Li, Yi Zhang, Aurelio Bay, Guido Haefeli, Christoph Frei, Frédéric Blanc, Tatsuya Nakada, Michel De Cian, Luca Pescatore, François Fleuret, Elena Graverini, Chitsanu Khurewathanakul, Renato Quagliani, Maria Vieites Diaz, Federico Betti, Andrea Merli, Aravindhan Venkateswaran, Luis Miguel Garcia Martin, Vitalii Lisovskyi, Mingkui Wang, Zhirui Xu, Lei Zhang, Jessica Prisciandaro, Mark Tobin, Minh Tâm Tran, Niko Neufeld, Matthew Needham, Marc-Olivier Bettler, Greig Alan Cowan, Maurizio Martinelli, Vladislav Balagura, Donal Patrick Hill, Cédric Potterat, Liang Sun, Pietro Marino, Mirco Dorigo, Jean Wicht, Xiaoxue Han, Sebastiana Gianì, Liupan An, Federico Leo Redi, Plamen Hristov Hopchev, Thibaud Humair, Maxime Schubiger, Hang Yin, Guido Andreassi, Violaine Bellée, Olivier Göran Girard, Axel Kuonen, Preema Rennee Pais, Pavol Stefko, Maria Elena Stramaglia, Tommaso Colombo, Vladimir Macko, Guillaume Max Pietrzyk, Lino Ferreira Lopes, Dipanwita Dutta, Yi Wang, Hans Dijkstra, Gerhard Raven, Peter Clarke, Frédéric Teubert, Giovanni Carboni, Victor Coco, Adam Davis, Paolo Durante, Yu Zheng, Anton Petrov, Maxim Borisyak, Feng Jiang, Zhipeng Tang, Luis Alberto Granado Cardoso, Daniel Hugo Cámpora Pérez