Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


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