You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because reduceRight calls Array.prototype.slice on the passed in collection it only supports Arrays
This begs the question, is reversing an object really a good pattern? How about an iterator? If yes, should implement eachRight, eachOfRight and friends?
Also should we document Iterable support on all methods supporting iterators? Currently we only state we support Array | Object in these cases.
The text was updated successfully, but these errors were encountered:
If you were using an iterator with reduceRight, you'd have to expand it into an array, e.g. async.reduceRight([...iterator], iteratee, cb). If your collection offered some sort of reverse iterator, you'd use that instead. Reversing the keys of an Object is mostly meaningless. I think it's fine if reduceRight only works with arrays.
Because
reduceRight
callsArray.prototype.slice
on the passed in collection it only supportsArrays
This begs the question, is reversing an object really a good pattern? How about an iterator? If yes, should implement
eachRight
,eachOfRight
and friends?Also should we document
Iterable
support on all methods supporting iterators? Currently we only state we supportArray | Object
in these cases.The text was updated successfully, but these errors were encountered: