Currying: Difference between revisions

Add Ecstasy example
m (syntax highlighting fixup automation)
(Add Ecstasy example)
Line 426:
9
</pre>
 
=={{header|EchoLisp}}==
[[EchoLisp]] has native support for curry, which is implemented thru closures, as shown in [[CommonLisp]] .
Line 449 ⟶ 450:
→ (λ _#:g1004 (#apply-curry #* (2 3 4) _#:g1004))
</syntaxhighlight>
 
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">module CurryPower
{
@Inject Console console;
void run()
{
function Int(Int, Int) divide = (x,y) -> x / y;
 
function Int(Int) half = divide(_, 2);
function Int(Int) partsOf120 = divide(120, _);
 
console.println($|half of a dozen is {half(12)}
|half of 120 is {partsOf120(2)}
|a third is {partsOf120(3)}
|and a quarter is {partsOf120(4)}
);
}
}</syntaxhighlight>
 
=={{header|Eero}}==
162

edits