fp::expr_unapply
-- create
a functional expression from an expressionfp::expr_unapply
(e,x)
tries to interpret
the expression e
as a function in x
and to
return a functional expression computing that function.
fp::expr_unapply(e <, x...>)
e |
- | expression |
x |
- | identifier |
A functional expression or FAIL
.
fp::expr_unapply
views the expression e
as a function in the indeterminates x,...
and tries to
return a functional expression computing that function. If
fp::expr_unapply
can not find a functional expression
FAIL
is returned.e
found by indets
are used.Get the functional expression computing
sin(x)
:
>> fp::expr_unapply(sin(x), x)
sin
Get the functional expression computing
sin(x)^2+cos(x)^2
:
>> fp::expr_unapply(sin(x)^2 + cos(x)^2)
2 2 cos + sin
unapply