Sequential scanl on 1D arrays as a combinator.