Question: Why does unapply sometimes return a composition?

If I try to use unapply on a composition of functions, I seem to get the result in one of two forms:

unapply(f(g(x)),x);
# Result: f@(x -> g(x))
unapply(2*f(g(x)),x);
# Result: x -> 2 f(g(x))

I need the second form (without the @ composition operator): is there any way to instruct Maple to output the first result without the @ sign? Or is there some way to convert the first form to the second form (i.e. x -> f(g(x)))?

Thanks!

Please Wait...