From Fōrmulæ wiki
Revision as of 19:49, 22 March 2019 by Admin (Talk | contribs) (Description (from Rosetta Code))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Description (from Rosetta Code)


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. Nothe that the result is another lambda expression.


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.