Macaulay2 » Documentation
Packages » Macaulay2Doc :: apply(ZZ,Function)
next | previous | forward | backward | up | index | toc

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

Ways to use this method: