Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


func first(f) {
  return f();
}
 
func second {
  return "second";
}
 
say first(second);              # => "second"
say first(func { "third" });    # => "third"