Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


 
function foo(x)
  str = x("world")
  println("hello $(str)!")
end
foo(y -> "blue $y") # prints "hello blue world"
 