not sure the following logic will create three publishers?
[1,2,3].publisher
[1,2,3,4].publisher
.flatMap(maxPublishers: .max(1)) { result in
change(result)
}.sink { result in
print(result)
}.store(in: &subscriptions)
func change(_ num: Int) → AnyPublisher<String, Never> {
Just(String(num)).eraseToAnyPublisher()
}
I still got 1234
1 post - 1 participant