User Guide
8.3 Iterative Commands
Maple has commands that perform common selection and repetition opera-
tions. These commands are more efficient than similar algorithms implemen-
ted using library commands. Table 8.2 lists the iterative commands.
Table 8.2: Iterative Commands
DescriptionCommand
Create sequenceseq
Compute numeric sumadd
Compute numeric productmul
Return operands that satisfy a conditionselect
Return operands that do not satisfy a conditionremove
Return operands that satisfy a condition and separately return operands
that do not satisfy a condition
selectremove
Apply command to the operands of an expressionmap
Apply binary command to the operands of two lists or vectorszip
Creating a Sequence
The seq command creates a sequence of values by evaluating a specified
expression over a range of index values or the operands of an expression.
See Table 8.3.
Table 8.3: The seq Command
ExamplesCalling Sequence Syntax
> seq(exp(x), x=-2..0);
seq(expression, name = initial .. final);
8.3 Iterative Commands • 333