OptionStreamOps

fs2.Stream.OptionStreamOps
final implicit class OptionStreamOps[F[_], O](self: Stream[F, Option[O]]) extends AnyVal

Attributes

Source
Stream.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def unNone: Stream[F, O]

Filters any 'None'.

Filters any 'None'.

Attributes

Example

scala> Stream(Some(1), Some(2), None, Some(3), None).unNone.toList
res0: List[Int] = List(1, 2, 3)
Source
Stream.scala
def unNoneTerminate: Stream[F, O]

Halts the input stream at the first None.

Halts the input stream at the first None.

Attributes

Example

scala> Stream(Some(1), Some(2), None, Some(3), None).unNoneTerminate.toList
res0: List[Int] = List(1, 2)
Source
Stream.scala