TIL about Publishers.MergeMany.init13 Dec 2019 ⇐ Notes archive
(This is an entry in my technical diary. There will likely be typos, mistakes, or wider logical leaps — the intent here is to “[let] others look over my shoulder while I figure things out.”)
Here’s a rough, not-tested-in-production sketch (if you know a way to ease the
eraseToAnyPublisher dance, let me know):
And in writing this entry, I decided to check and make sure I wasn’t missing something. After all, it’s odd (pun intended) that the merging operators on
Publisher stop at arity seven.
Then, I noticed the
Publishers.MergeMany return value on the first and, below the (hopefully temporary) “No overview available” note on its documentation, there’s a variadic initializer!
So, there you have it. TIL merging a sequence of publishers goes by the name of