15 lines
494 B
Plaintext
15 lines
494 B
Plaintext
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.print($|half of a dozen is {half(12)}
|
|
|half of 120 is {partsOf120(2)}
|
|
|a third is {partsOf120(3)}
|
|
|and a quarter is {partsOf120(4)}
|
|
);
|
|
}
|
|
}
|