How much eagerness is allowed in a lazy implementation?

This is an alternate route to my last problem.

startIndex (and isEmpty and underestimatedCount) would be O(1) if I do the O(n) search for the first element (to cache its indexes) eagerly in the initializer. Would that violate the spirit of something destined to be part of LazyCollection?

Terms of Service

Privacy Policy

Cookie Policy