appliable - Maple Help

type/appliable

check if an object can be applied

 Calling Sequence type(expr, appliable)

Parameters

 expr - expression

Description

 • The type(expr, appliable) calling sequence returns true if expr, when applied to some expression or expression sequence, may evaluate to an expression that is not of type $\mathrm{specfunc}\left(\mathrm{expr}\right)$.
 • More specifically, expr is appliable if one of the following is true:
 - It is one of the following types.

 complex({numeric,float})

 - It is of type @ and all its operands are appliable.
 - It is of type @@ and its first operand is appliable.
 - It is of type indexed and its zeroth operand is appliable.
 - It is an appliable module.
 - It is of type function, and an evalapply rule exists for its zeroth operand.

Examples

 > type( proc() end proc, appliable );
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{foo},\mathrm{appliable}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(2,\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{D}\left[1\right],\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(x⇒y,\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(\mathrm{sin}@\mathrm{cos},\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{type}\left(\left\{f,g\right\},\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left(\mathrm{LinearAlgebra},\mathrm{appliable}\right)$
 ${\mathrm{false}}$ (8)
 > $\mathrm{type}\left(\mathbf{module}\left(\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{_export}\left(\mathrm{ModuleApply}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end module},\mathrm{appliable}\right)$
 ${\mathrm{true}}$ (9)