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

apply(ZZ,Function) -- apply a function to {0,..., n-1}

Synopsis

Description

The command apply(n,f) is equivalent to apply(toList(0 .. n-1),f).
i1 : apply(10, i -> i^2)

o1 = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81}

o1 : List