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

Online Help

All Products    Maple    MapleSim


evalapply

user definable control over function application

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

`evalapply/V`(f, t))

Parameters

f

-

function call

t

-

list of arguments

Description

• 

When nontrivial Maple objects such as unevaluated function calls, lists, or sets are applied to arguments as if they were functions, the evalapply command determines the outcome. For example, an object of type function can be applied to arguments, as in V(f, g)(a, b, c).

• 

The effect of applying the result of most built-in constructors to a sequence of arguments is determined by an internal evalapply function. The evalapply command also implements the application semantics for compositions and compositional powers.

• 

The effect of applying a function call to arguments can be specified by defining an optional procedure of the name `evalapply/V`, where V is the name of the function.

• 

When present, the procedure of the name `evalapply/V` is automatically invoked with f set to V(f, g), and t set to [a, b, c] in response to the function invocation V(f, g)(a, b, c).

Examples

Vf,ga,b,c

Vf,ga,b,c

(1)

`evalapply/V` := proc(f,t) local i;
  V(seq(op(i,f)(op(t)),i=1..nops(f)));
end proc:

Vf,ga,b,c

Vfa,b,c,ga,b,c

(2)

a,bx,y

ax,y,bx,y

(3)

a,bx,y

ax,y,bx,y

(4)

a=bx,y

ax,y=bx,y

(5)

a+bx,y

ax,y+bx,y

(6)

abx,y

ax,ybx,y

(7)

abx,y

ax,ybx,y

(8)

abx,y

ax,ybx,y

(9)

abx,y

ax,ybx,y

(10)

a·bx,y

ax,y·bx,y

(11)

a,bx,y

ax,y,bx,y

(12)

a..bx,y

ax,y..bx,y

(13)

aandbx,y

ax,yandbx,y

(14)

aorbx,y

ax,yorbx,y

(15)

axorbx,y

ax,yxorbx,y

(16)

abx,y

ax,ybx,y

(17)

notax,y

notax,y

(18)

a@bx,y

abx,y

(19)

anax,y

an+1x,y

(20)

combinatchoose4,3

1,2,3,1,2,4,1,3,4,2,3,4

(21)

mapop,combinatchoose4,3

1,2,3,1,2,4,1,3,4,2,3,4

(22)

See Also

apply

eval

type/appliable

type/function