Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


proc first(fn: proc): auto =
  return fn()
 
proc second(): string =
  return "second"
 
echo first(second)