This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
flatMap should act like it does a yield *
on each iterable
#114
Labels
yield *
on each iterable
#114
Currently
Iterator.prototype.flatMap
is specified roughly like this:Arguably it should be more like this:
This changes two details of behavior:
.throw(exc)
method to forward the exception along to the inner iterator (consistent with other iterator helpers). Currently the inner iterator is instead closed, andexc
is then thrown again..next(value)
method to forward the value along to the inner iterator. Currently the inner iterator's.next()
method is always called with no arguments.The text was updated successfully, but these errors were encountered: