MTM
Map
Apply a function to a list of elements
Calling Sequence
Parameters
Description
Examples
Map(f,M1,...,Mn)
Map[k](f,M1,...,Mn)
f
-
procedure
M1,...,Mn
Array, list, set, scalar
k
(optional) positive integer
The function Map(f,M1,...,Mn) applies the function f to each element of M1, with extra arguments M2,...,Mn.
The function Map[k](f,M1,...,Mn) applies the function f to each element of Mk, with extra arguments M1,...,Mk-1,Mk+1,...,Mn.
For scalar Mk, the function Map[k](f,M1,...,Mn) is equivalent to f(M1,...,Mn).
with⁡MTM:
M≔Matrix⁡1,2,3,4:
Map⁡a↦a2,M
14916
Map⁡a↦a2,b+c
b+c2
Map2⁡`+`,a,b,c,d
a+b+d,a+c+d
See Also
Array
array
map
zip
MTM[Zip]
Download Help Document