Gozala / reducers

Library for higher-order manipulation of collections
MIT License
181 stars 8 forks source link

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

Open Raynos opened 11 years ago

Raynos commented 11 years ago

It's confusing to have both signatures.

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

Gozala commented 11 years ago

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

Raynos commented 11 years ago

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