Question: Applying chain functions

Hello guys,

From time to time I use the procedure below to chain functions to the right of the expression to be evaluated.

`&/`:=()->args[-1](args[1],args[2..-2]):

For example:

(sin(x)^2+cos(x)^2)&/simplify                      1

For functions that work with just one argument, it's okay, but with functions that take more than one argument (like convert, subs), I don't know how to implement it.

0.76&/ convert(???,fraction)

(a*x+*x*b)&/simplify&/subs(a=2,b=3,???)

If someone more experienced can help, I'd be very grateful.

Oliveira

Please Wait...