callable - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

type/callable

check if an object is a procedure or appliable module

 Calling Sequence type(expr, callable)

Parameters

 expr - expression

Description

 • The type(expr, callable) calling sequence returns true if expr is either a procedure, a module with a ModuleApply procedure, or a name whose assigned value is one of the preceding.

Examples

 > type( proc() end proc, callable );
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{foo},\mathrm{callable}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(2,\mathrm{callable}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left({\mathrm{D}}_{1},\mathrm{callable}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(x\mathbf{⇒}y,\mathrm{callable}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left(\mathrm{sin}@\mathrm{cos},\mathrm{callable}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\left\{f,g\right\},\mathrm{callable}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left(\mathrm{LinearAlgebra},\mathrm{callable}\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{callable}\right)$
 ${\mathrm{false}}$ (9)
 > type( module() export ModuleApply := proc() end proc; end module, callable );
 ${\mathrm{true}}$ (10)

 See Also