RosettaCodeData/Task/Higher-order-functions/Euler/higher-order-functions.euler

6 lines
130 B
Plaintext

>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):