Implementing .flat_map() is a bit of a journey because I wanted to implement this like the stdlib (even ordering them the same in Ext as Iterator), which meant adding IntoGenerator and modifying .flatten() to take it. from_iter() was from a failed experiment towards this.
All steps in this journey are broken out into individual commits for perusing convenience.
Implementing
.flat_map()
is a bit of a journey because I wanted to implement this like the stdlib (even ordering them the same inExt
asIterator
), which meant addingIntoGenerator
and modifying.flatten()
to take it.from_iter()
was from a failed experiment towards this.All steps in this journey are broken out into individual commits for perusing convenience.
Potential next steps:
IntoGenerator
implsFlatMap
newtype.FlatMap