Instance Method

first()

Publishes the first element of a stream, then finishes.

Declaration

func first() -> Publishers.First<Publishers.CombineLatest<A, B>>

Return Value

A publisher that only publishes the first element of a stream.

Discussion

If this publisher doesn’t receive any elements, it finishes without publishing.