accumulate

accumulate(f,x0,{x1,...,xn}) -- computes the list {x0,f(x0,x1),f(f(x0,x1),x2),f(f(f(x0,x1),x2),x3),...} .

     i1 = accumulate(plus,1,{10,100,1000})
     
     o1 = {1,11,111,1111}
     
     o1 : List
     

Go to main index.

Go to concepts index.