First 2 values using higher order functions (preferably)

I was surprised by the need for this but this is the way I would do it. :+1:
values as any Sequence<Bool> will not work with lazy. as some is needed to eliminate the need for two lines, but nobody has ever mentioned plans for it being added to the language.

Swift doesn't have the necessary mechanisms for generalizing as some to a function, so for every protocol+associatedtype combination you need to use it with, you need to write a new property. :woozy_face:

public extension Sequence {
  /// A workaround for the language not supporting `as some Sequence<Element>`.
  var asSomeElementSequence: some Sequence<Element> { self }
}

values.asSomeElementSequence.lazy.filter(isValid).prefix(2)