Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


 
>function f(x,a) := x^a-a^x
>function dof (f$:string,x) := f$(x,args());
>dof("f",1:5;2)
 [ -1  0  1  0  -7 ]
>plot2d("f",1,5;2):
 