[top][index]
search for:

apply(BasicList,BasicList,Function) -- apply function to elements in pairs

Synopsis:

  • Function: apply -- apply a function to each element
  • Input:
  • an instance of class BasicList.
  • an instance of class BasicList.
  • an instance of class Function.
  • Output:
  • an instance of class BasicList.
  • apply(v,w,f) -- produces, from lists v and w, a list z in which the i-th element w_i is obtained by evaluating f(v_i,w_i). If v and w are lists of the same class, then the result is also of that class.

    i1 : apply({1,2,3}, {100,200,300}, (i,j) -> i+j)

    o1 = {101, 202, 303}

    o1 : List


    [top][index]
    search for: