intersperse

Intersperse stream with provided element similar to List.mkString.

Simple operators

Signature

def intersperse[T >: Out](start: T, inject: T, end: T): Repr[T]
def intersperse[T >: Out](inject: T): Repr[T]

Description

Intersperse stream with provided element similar to List.mkString. It can inject start and end marker elements to stream.

emits when upstream emits an element or before with the start element if provided

backpressures when downstream backpressures

completes when upstream completes

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.