| Up | Next | Prev | PrevTail | Tail |
The MAP operator applies a uniform evaluation pattern to all members of a composite structure: a matrix, a list, or the arguments of an operator expression. The evaluation pattern can be a unary procedure, an operator, or an algebraic expression with one free variable.
It is used with the syntax:
MAP(FNC:function,OBJ:object)
Here OBJ is a list, a matrix or an operator expression. FNC can be one of the following:
The rule form for FNC is needed when more than one free variable occurs.
Examples:
map(abs,{1,-2,a,-a}) -> {1,2,ABS(A),ABS(A)}
map(int(~w,x), mat((x^2,x^5),(x^4,x^5))) ->
[ 3 6 ]
[ x x ]
[---- ----]
[ 3 6 ]
[ ]
[ 5 6 ]
[ x x ]
[---- ----]
[ 5 6 ]
map(~w*6, x^2/3 = y^3/2 -1) -> 2*X^2=3*(Y^3-2)
You can use MAP in nested expressions. However, you cannot apply MAP to a non-composite object, e.g. an identifier or a number.
| Up | Next | Prev | PrevTail | Front |