RosettaCodeData/Task/Higher-order-functions/Mathematica/higher-order-functions-1.math

5 lines
113 B
Plaintext

PassFunc[f_, g_, h_, x_] := f[g[x]*h[x]]
PassFunc[Tan, Cos, Sin, x]
% /. x -> 0.12
PassFunc[Tan, Cos, Sin, 0.12]