Partial function application: Difference between revisions

Line 1,242:
 
=={{header|Lambdatalk}}==
 
Lambdatalk{lambda functionstalk} aredoesn't curried,know therefore,closures partialbut functionaccepts applicationde isfacto trivialpartial application. Not giving a multi-argument function all of its arguments will simply return a function that takes the remaining arguments.
<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}}}