[top][index]
search for:

sum Set -- sum of elements

Synopsis:

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

    i1 : a = set{1,100,10000}

    o1 = Set {10000, 100, 1}

    o1 : Set
    i2 : sum a

    o2 = 10101

    See also:

  • sum -- compute the sum
  • Code:

         -- ../../../Macaulay2/m2/set.m2:53
         sum Set := s -> sum toList s

    [top][index]
    search for: