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