Related to #792
To make Intersperse[With] adaptors lazy, I use a nested option which is what core::iter::Peekable uses internally.
EDITs: I certainly hope that it's okay to use a nested option in such case because I did a similar thing to make Product lazy (fixing cartesian_product and iproduct! un-laziness) and make CoalesceBy lazy (fixing 5 methods) that I'll publish once this PR is merged.
Related to #792 To make
Intersperse[With]
adaptors lazy, I use a nested option which is whatcore::iter::Peekable
uses internally.EDITs: I certainly hope that it's okay to use a nested option in such case because I did a similar thing to make
Product
lazy (fixingcartesian_product
andiproduct!
un-laziness) and makeCoalesceBy
lazy (fixing 5 methods) that I'll publish once this PR is merged.