beepbeep-3 icon indicating copy to clipboard operation
beepbeep-3 copied to clipboard

Adding a way to indicate a start value from constructor for CumulateFunction

Open AwesomeLuffy opened this issue 5 months ago • 0 comments

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));

AwesomeLuffy avatar Feb 15 '24 19:02 AwesomeLuffy