Question: How to revert ("unapply") a function composition application

How to revert ("unapply") a function composition application?
Example:

`@`(ln, sinh)

`@`(ln, sinh)

(1)

apply(`@`(ln, sinh), x)

ln(sinh(x))

(2)

Unapply does not do the opposite of what apply does

unapply(ln(sinh(x)), x)

proc (x) options operator, arrow; ln(sinh(x)) end proc

(3)

What I am instered in: revert/undo the apply operation leading to(2) and returning the corresponding function composition of (1).

Maybe there is a convert function that I have overlooked.

NULL


 

Download revert_application_of_function_composition.mw

Please Wait...