The scan function has a variant in which it takes an input parameter as the first accumulator argument. I find that function more convenient since it requires a bit less code for the accumulator. I noticed that the same is not true for reduce, so I decided to introduce this behavior. I pretty much followed the same code style as scan has. I did the same for tests too, for every ~second existing test for reduce I introduced the new variant of the operator.
The
scan
function has a variant in which it takes an input parameter as the first accumulator argument. I find that function more convenient since it requires a bit less code for the accumulator. I noticed that the same is not true forreduce
, so I decided to introduce this behavior. I pretty much followed the same code style asscan
has. I did the same for tests too, for every ~second existing test forreduce
I introduced the new variant of the operator.