check if an object can be applied - Maple Help

Online Help

All Products    Maple    MapleSim


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

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 specfuncexpr.

• 

More specifically, expr is appliable if one of the following is true:

  

- It is one of the following types.

procedure

equation

logical

+

*

^

dot

range

complex({numeric,float})

list

set

array

  

- 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 );

true

(1)

typefoo,appliable

false

(2)

type2,appliable

true

(3)

typeD1,appliable

true

(4)

typexy,appliable

true

(5)

typesin@cos,appliable

true

(6)

typef,g,appliable

true

(7)

typeLinearAlgebra,appliable

false

(8)

typemoduleexportModuleApply;end module,appliable

true

(9)

See Also

apply, evalapply, type, type/@, type/@@, type[procedure], unapply


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam