Anonymous user
Partial function application: Difference between revisions
→{{header|Lambdatalk}}
Line 1,242:
=={{header|Lambdatalk}}==
<lang Scheme>
1) just define function as usual:
{def add {lambda {:a :b :c} {+ :a :b :c}}} -> add
2) and use it:
{add 1 2 3} -> 6
{{add 1} 2 3} -> 6
{{add 1 2} 3} -> 6
{{{add 1} 2} 3} -> 6
3) application:
{def fs {lambda {:f} map :f}}
{def f1 {lambda {:x} {* :x 2}}}
|