Skip to content

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

Open
AwesomeLuffy wants to merge 2 commits into
liflab:masterfrom
AwesomeLuffy:development
Open

Adding a way to indicate a start value from constructor for CumulateFunction#82
AwesomeLuffy wants to merge 2 commits into
liflab:masterfrom
AwesomeLuffy:development

Conversation

@AwesomeLuffy

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant