Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add default (starting) value to sum pipe #86

Open
ciukstar opened this issue Dec 17, 2018 · 0 comments
Open

Add default (starting) value to sum pipe #86

ciukstar opened this issue Dec 17, 2018 · 0 comments

Comments

@ciukstar
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request

Current behavior
No default value for sum

Expected behavior
Equivalent to [1,2,3].reduce((a,b) => a + b,0)

[1,2,3] | sum:0 -> 6
[1,2,3] | sum:1 -> 7
[] | sum:0 -> 0
[1,2,3] | sum -> 6

What is the motivation / use case for changing the behavior?
More control over sum pipe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant