flatMap

inline fun <T, R> Event<T>.flatMap(transform: (T) -> Event<R>): Event<R>(source)

Returns the result of applying transform to this Event's value if this is a Event.Value. Otherwise, returns itself.

Slightly different from map in that transform is expected to return an Event (which could be Event.Error or Event.Complete).