beepbeep-3
beepbeep-3 copied to clipboard
Adding a way to indicate a start value from constructor for CumulateFunction
Actualy, when we want to create a Cumulate with a CumulativeFunction inside that process a sum of number, it's not possible to indicate that we want to start at "1", it only take the first input stream. This modification allow in the constructor to indicate a start value and still allow to use the basic method. So now we can use it like this :
Cumulate mySumWithStartValue= new Cumulate(new CumulateFunction<Number>(Numbers.addition, 1));
And still like that :
Cumulate myBasicSum = new Cumulate(new CumulateFunction<Number>(Numbers.addition));