## `fp::expr_unapply` -- create a functional expression from an expression

#### Introduction

`fp::expr_unapply``(e,x)` tries to interpret the expression `e` as a function in `x` and to return a functional expression computing that function.

#### Call(s)

`fp::expr_unapply(e <, x...>)`

#### Parameters

`e` | - | expression
`x` | - | identifier

#### Returns

A functional expression or `FAIL`.

#### Related Functions

`fp::unapply`

#### Details

- `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.
- If no indeterminates are given, any indeterminates of `e` found by `indets` are used.

#### Example 1

Get the functional expression computing `sin(x)`:

    >> fp::expr_unapply(sin(x), x)

                                        sin

#### Example 2

Get the functional expression computing `sin(x)^2+cos(x)^2`:

    >> fp::expr_unapply(sin(x)^2 + cos(x)^2)

                                       2      2
                                    cos  + sin

#### Changes

- used to be called `unapply`

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000