The docs for LazySequenceProtocol says to create lazy sequence operations, extend the protocol with methods that return lazy wrappers that conform to LazySequenceProtocol. The analogue for LazyCollectionProtocol just replaces all the “sequences” with “collections.” But I have written a Sequence that is based off a Collection. So the type conforms to LazySequenceProtocol but its “lazy” generator is an extension method of LazyCollectionProtocol. Is that OK; there’s no library assumptions I’m breaking?
(The type is a single-pass vendor of fixed-size sub-collections.)
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com