Hello @icanzilb ,
Thank you for the snippet with custom MergeMany implementation, looks great! I am wondering if we can start with empty publisher and remove not empty
precondition? For example:
// let initialPublisher = PassthroughSubject<Story, Error>().eraseToAnyPublisher() // Not sure if this will be better?
let initialPublisher = Empty<Story, Error>().eraseToAnyPublisher()
return storyIDs.reduce(initialPublisher) { (combined, id) -> AnyPublisher<Story, Error> in
return combined.merge(with: story(id: id))
.eraseToAnyPublisher()
}
Thanks,
Dzmitry.