Macaulay2
»
Documentation
Packages
»
Macaulay2Doc
::
sum(VisibleList,Function)
next
|
previous
|
forward
|
backward
| up |
index
|
toc
sum(VisibleList,Function) -- sum results of applying a function
Synopsis
Function:
sum
Description
sum(v,f)
yields the sum of the expressions obtained by applying
f
to each of the elements of the list or sequence
v
.
i1 : sum(1 .. 10, i -> i^2) o1 = 385
See also
sum
-- compute the sum
Ways to use this method:
sum(VisibleList,Function)
-- sum results of applying a function