foo.map { Success(it)}.onErrorReturn { Error(it) }
# rx
u
foo.map { Success(it)}.onErrorReturn { Error(it) }