You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lately I faced a use case where a reducer function that I pass to a “scan” operator could return an optional.
the expected behaviour was: if the function returns nil then there is no change made in the accumulator and the scan operator continues with the next values.
Hi everyone,
lately I faced a use case where a reducer function that I pass to a “scan” operator could return an optional.
the expected behaviour was: if the function returns nil then there is no change made in the accumulator and the scan operator continues with the next values.
the signature would be something like:
compactScan(initial: A, _ nextPartialResult: (A, Output) -> A?) -> AnyPublisher<A, Failure>
What do you think?
The text was updated successfully, but these errors were encountered: