Group Group Group Group Group Group Group Group Group

Errata: Wrong marble diagram for flatMap (page 147)?


Hi there,

I was re-reading the RxSwift book (2nd edition) to refresh some of the concepts and I didn’t understand the marble diagram for flatMap in page 147. After thinking a bit about it, I think it may be wrong:

In the box specifying the transformation you find:

flatMap { $0.value * 10 }

flatMap takes a function transforming an element into an observable, and as you state in the text,

The source observable is of an object type that has a value property that itself is an observable of type Int.

So if $0.value is an Observable<Int>, shouldn’t the text inside the box include the following instead?

flatMap { $ { $0 * 10 } }

Best regards


@scotteg Can you please help with this when you get a chance? Thank you - much appreciated! :]


Hi @jgongo, good catch! This was already fixed for the next release of the book (minus the map to keep the slide focused on flatMap) and will be fixed in the next update of this video course too. Thanks

1 Like