/** * Terminates the stream when encountering the first `None`. * * @tsplus getter effect/core/stream/Stream collectWhileSome */ export function collectWhileSome( self: Stream> ): Stream { return self.collectWhile((option) => option.isSome() ? Maybe.some(option.value) : Maybe.none) }