Instance Method

drop(while:)

Omits elements from the upstream publisher until a given closure returns false, before republishing all remaining elements.

Declaration

func drop(while predicate: @escaping (Prefix.Output) -> Bool) -> Publishers.DropWhile<Publishers.Concatenate<Prefix, Suffix>>

Parameters

predicate

A closure that takes an element as a parameter and returns a Boolean value indicating whether to drop the element from the publisher’s output.

Return Value

A publisher that skips over elements until the provided closure returns false.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software