Anonymous user
Currying: Difference between revisions
add Currying for BLC
m (→{{header|Wren}}: Changed to Wren S/H) |
imported>Tromp (add Currying for BLC) |
||
Line 464:
bc
bcde</pre>
=={{header|Binary Lambda Calculus}}==
In BLC, all multi argument functions are necessarily achieved by currying, since lambda calculus functions (lambdas) are single argument. A good example is the Church numeral 2, which given a function f and an argument x, applies f twice on x: C2 = \f. (\x. f (f x)). This is written in BLC as
<syntaxhighlight>00 00 01 110 01 110 01</syntaxhighlight>
where 00 denotes lambda, 01 denotes application, and 1^n0 denotes the variable bound by the n'th enclosing lambda. Which is all there is to BCL!
=={{header|BQN}}==
|