next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: apply(BasicList,Function)

apply(BasicList,Function) -- apply a function to each element of a list

Synopsis

Description

The result will have the same class as L.
i1 : apply({1,3,5,7}, i -> i^2)

o1 = {1, 9, 25, 49}

o1 : List
i2 : apply([1,3,5,7], i -> i^2)

o2 = [1, 9, 25, 49]

o2 : Array
i3 : apply((1,3,5,7), i -> i^2)

o3 = (1, 9, 25, 49)

o3 : Sequence

See also