type/applied - Maple Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/applied

type/applied

check for an object of type applied

 Calling Sequence type(expr, applied) type(expr, applied(vtype))

Parameters

 expr - any expression vtype - type

Description

 • The call type(expr, applied) checks if expr is of the form name(args), where args is an expression sequence of zero or more items.
 • If a parameter vtype is given, then it also checks if each of the arguments are each of type vtype.
 • The types applied and applied(vtype) are identical to the types function and $\mathrm{function}\left(\mathrm{vtype}\right)$, respectively.

Examples

 > $\mathrm{type}\left(\mathrm{sin}\left(x\right),'\mathrm{applied}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{sin},'\mathrm{applied}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(f\left(\right),'\mathrm{applied}'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(f\left(x,y,z\right),'\mathrm{applied}'\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(f\left(x,y,z\right),'\mathrm{applied}\left(\mathrm{name}\right)'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(f\left(1,y,z\right),'\mathrm{applied}\left(\mathrm{name}\right)'\right)$
 ${\mathrm{false}}$ (6)