The explanation of reason to use concat(_ : ) operator in the following code:
eoCategories
.concat(updatedCategories)
.bind(to: categories)
was a bit unclear for me (as a beginner).
Sure, this works fine and as explained, but the following worked fine as well:
updatedCategories
.bind(to: categories)
i.e. without concat()!?
To make the explanation somewhat clear I replaced
let downloadedEvents = EONET.events(forLast: 360)
with following (i.e. poor connection):
let downloadedEvents = Observable<[EOEvent]>.create { observer in return Disposables.create() }
In this case updatedCategories emits nothing and we will not see even categories.
BTW, it is mentioned in the note on the page 194 that combineLatest emits something only in case when both sources emit at least one non-stop event.
Like if in the above code to add
observer.onNext()
categories will appear, although with count (0).