next up previous contents index
Next: CheckingArray Up: BoundedFiniteLinearStructureType Previous: linearSearch   Contents   Index


map


Usage

map f
map! f
map(f)(a)
map!(f)(a)


Signature

map: (T $\to$ T) $\to$ % $\to$ %


Parameter Type Description
f T $\to$ T a map
a % a finite linear structure


Returns

map(f)(a) returns the new structure [f(x) for x in a], while map(f) returns the mapping $a \to$ [f(x) for x in a]. In both cases, map! does not make a copy of the structure a but modifies it in place.



Manuel Bronstein 2004-06-28