[top][index]
search for:

product Tally -- product of elements

Synopsis:

  • Function: product
  • Input:
  • an instance of class Tally.
  • product v -- yields the product of the elements in the tally v.

    i1 : a = tally{2,2,2,2,2,3,3,3,5,5}

    o1 = Tally{2 => 5}
               3 => 3
               5 => 2

    o1 : Tally
    i2 : product a

    o2 = 21600

    See also:

  • product
  • Code:

         -- ../../../Macaulay2/m2/set.m2:30
         product(Tally) := (w) -> product(pairs w, (k,v) -> k^v)

    [top][index]
    search for: