Open
Description
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?