next(isolation:)
Produces the next element in the compact map sequence.
Declaration
mutating func next(isolation actor: isolated (any Actor)?) async throws(AsyncCompactMapSequence<Base, ElementOfResult>.Failure) -> ElementOfResult?Discussion
This iterator calls next() on its base iterator; if this call returns nil, next() returns nil. Otherwise, next() calls the transforming closure on the received element, returning it if the transform returns a non-nil value. If the transform returns nil, this method continues to wait for further elements until it gets one that transforms to a non-nil value.