Currying: Difference between revisions
m
→{{header|Ecstasy}}
Line 662:
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module CurryPower {
@Inject Console console;
void run() {
function Int(
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>
|