[top][index]
search for:

sum {...} -- sum the elements of a list

Synopsis:

  • Function: sum -- compute the sum
  • Input:
  • an instance of class List.
  • sum v -- yields the sum of the elements in the list v.

    i1 : sum {1,2,3,4,5}

    o1 = 15

    See also:

  • sum -- compute the sum
  • Code:

         -- ../../../Macaulay2/m2/lists.m2:55
         sum(List) := x -> plus toSequence x

    [top][index]
    search for: