Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
func getAllData() -> AnyPublisher<[MyData], Error> {
getIDs().flatMap { ids -> AnyPublisher<[MyData], Error> in
let publishers = { self.getData(with: $0) }
return Publishers.Sequence<[AnyPublisher<MyData, Error>], Error>(sequence: publishers)
.flatMap { $0 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.