finish

Resume the task awaiting the next iteration point by having it return nil, which signifies the end of the iteration.

iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
func finish()

Calling this function more than once has no effect. After calling finish, the stream enters a terminal state and doesn’t produce any additional elements.