From Fōrmulæ wiki
Revision as of 20:39, 19 September 2018 by Admin (Talk | contribs)

Jump to: navigation, search

This page is the answer to the task Currying in the Rosetta Code.

Description (from Rosetta Code)

Task Create a simple demonstrative example of Currying in a specific language.

Add any historic details as to how the feature made its way into the language.


In Fōrmulæ, a lambda application can specify less parameters of its definition. It such a case, a currying is applied, which returns a lambda expression defined with the remaining parameters.

The following is a simple definition of a lambda expression:


when a lambda application is called with the same number of arguments, the result is the habitual:


However, if a less number of parameters is applied, currying is performed:


Historic details

When Fōrmulæ designer created the standard symbolic package the currying operation was not included, because that he thought it was a mere curiosity of lambda expressions and lambda calculus thories. Later, when testing the package, he was trying to create the Church numerals, he realized that currying was needed, so he included it.