Currying: Difference between revisions

Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag
(Add Ecstasy example)
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag)
Line 452:
 
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">module CurryPower
module CurryPower
{
@Inject Console console;
Line 462 ⟶ 463:
function Int(Int) partsOf120 = divide(120, _);
 
console.printlnprint($|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>
</syntaxhighlight>
 
{{out}}
<pre>
half of a dozen is 6
half of 120 is 60
a third is 40
and a quarter is 30
</pre>
 
=={{header|Eero}}==
162

edits