Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reductions(acc, value) vs fold(value, acc) #43

Open
Raynos opened this issue Jan 22, 2013 · 2 comments
Open

reductions(acc, value) vs fold(value, acc) #43

Raynos opened this issue Jan 22, 2013 · 2 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Jan 22, 2013

It's confusing to have both signatures.

I made the mistake of doing reductions(function (v, acc) { ... })

@Gozala
Copy link
Owner

Gozala commented Jan 22, 2013

You're right, although I would still prefer fold(input, function(acc, v) { ... }) since every other language follows that pattern.

@Raynos
Copy link
Contributor Author

Raynos commented Jan 22, 2013

fold(function (acc, v) { ... }) is fine. Just give me forEach(function (v) { ... }) :D

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

No branches or pull requests

2 participants