Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Currying/Ecstasy/currying.ecstasy
Normal file
14
Task/Currying/Ecstasy/currying.ecstasy
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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)}
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue