Currying: Difference between revisions

1 byte removed ,  11 months ago
m
Line 662:
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module CurryPower {
{
@Inject Console console;
void run() {
function Int(Int, Int) halfdivide = divide(_x, 2y) -> x / y;
{
function Int(Int, Int) divide = (x,y) -> x /half y = divide(_, 2);
function Int(Int) partsOf120 = divide(120, _);
 
function Int(Int) half = divide(_, 2);
function Int(Int) partsOf120 = divide(120, _);
 
console.print($|half of a dozen is {half(12)}
Line 677 ⟶ 674:
|and a quarter is {partsOf120(4)}
);
}
}
}
</syntaxhighlight>
 
162

edits