2 lines
124 B
Scala
2 lines
124 B
Scala
f = { |x, y| x.(y) }; // a function that takes a function and calls it with an argument
|
||
f.({ |x| x + 1 }, 5); // returns 5
|