Skip to content

Instantly share code, notes, and snippets.

@aballano
Last active September 15, 2017 11:20
fun <T> Single<T>.doCompletableOnSuccess(function: (T) -> Completable): Single<T> =
flatMap { function(it).andThen(Single.just(it)) }
fun <T> Maybe<T>.doCompletableOnSuccess(function: (T) -> Completable): Maybe<T> =
flatMap { function(it).andThen(Maybe.just(it)) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment