Closed tvedtorama closed 3 years ago
@tvedtorama IIRC AsyncIterable's scan
and reduce
signatures changed to accommodate an optional AbortSignal addition, so I imagine @mattpodwysocki updated Iterable's signatures to maintain symmetry.
That said, it'd be good if Iterable's signature could match both AsyncIterable and the Array built-in's.
Ok,
thank you - that explains the change. I still think this might be a major issue with many upgraders, though. Perhaps it could be possible to support both function signatures?
@tvedtorama Yeah, we should be able to do that easily. I'll open a PR.
@tvedtorama just published ix@4.1.0
with this fix. Thanks!
I tried to upgrade to v4, but all my reduce-related code failed to compile. Turns out the signature for reduce is no longer the same as for array.reduce, with an options-object instead of the two arguments for callback and seed.
This will not compute for me, as it requires huge rewrites. Also, functions requiring an object with a reduce function, will no longer work with IterableX-instances, only arrays.
Why is this change introduced?