[top][index]
search for:

product({...},{...},Function) -- product of results of applying a function pairwise

Synopsis:

  • Function: product
  • Input:
  • an instance of class List.
  • an instance of class List.
  • an instance of class Function.
  • product(v,w,f) -- yields the product of the results obtained by applying f to each of the pairs (i,j) of elements from the lists v and w, which should be of the same length.

    i1 : M = monoid [x,y,z];
    i2 : product({2,3,4},{x,y,z},(i,j)->j^i)

          2 3 4
    o2 = x y z

    o2 : M

    See also:

  • product
  • Code:

         -- ../../../Macaulay2/m2/lists.m2:87
         product(List, List, Function) := (v,w,f) -> product(apply(v,w,identity),f)

    [top][index]
    search for: