fp::unapply -- create a
procedure from an expression
Introductionfp::unapply(e,x) interprets the expression
e as a function in x and returns a procedure
computing that function.
Call(s)fp::unapply(e <, x...>)
Parameterse |
- | expression |
x |
- | identifier |
ReturnsA procedure.
e
Related
Functions
Detailsfp::unapply views the expression e as a
function in the indeterminates x,... and returns a
procedure computing that function.e found by indets are used.
Example
1Get the procedure computing
sin(x)^2+cos(y)^2:
>> s := fp::unapply(sin(x)^2 + cos(y)^2, x, y)
(x, y) -> cos(y)^2 + sin(x)^2