SE-0234: Removing Sequence.SubSequence

I'm not sure it's all that useful to defer dropping until the first call to next. The times when someone calls makeIterator, but then doesn't consume from it at all are probably pretty tiny (even in the case of zip, you'd only realize a win if the left side of the zip was empty). The trade-off is that by dropping all the elements at the start, you avoid having to check the count is zero every time you call next. It's probably worth a quick benchmarking to see if that makes any difference.

I think someone mentioned upstream that DropFirstSequence should conditionally conform to LazySequenceProtocol where Base: LazySequenceProtocol, which would avoid the current un-lazying.

It would be a good starter bug/proposal for someone to go through and find other eager things that should be added to lazy. split is definitely a case where a lazy equivalent would be good to add. Probably also, any future proposals for eagerly-evaluated additions should usually be paired with a lazy version if appropriate.

I'm specifically thinking about lazy method chaining, that allows the compiler to fuse them all into single loop. I don't have examples that include dropFirst, but to illustrate what I have in mind:

Or a little bit of manual fusion of closures:

When I replaced prefix with my implementation:

I'd love to verify that #PR 20221 matches that performance. Can you please provide us with downloadable toolchain?

SE-0234 has been accepted; thank you all for your participation.

I'll be closing this thread, but please feel free to take the discussion about lazy sequence implementations to the evolution discussion forum.