diff --git a/rxandroidextensions/src/main/java/com/yxf/rxandroidextensions/Pair.kt b/rxandroidextensions/src/main/java/com/yxf/rxandroidextensions/Pair.kt index ccf1bd2..7b0a031 100644 --- a/rxandroidextensions/src/main/java/com/yxf/rxandroidextensions/Pair.kt +++ b/rxandroidextensions/src/main/java/com/yxf/rxandroidextensions/Pair.kt @@ -13,8 +13,8 @@ fun Observable>.map(block: (t: T, d: D) -> R): Observable Observable>.flatMap(block: (t: T, d: D) -> R): Observable { - return flatMap { Observable.just(block(it.first, it.second)) } +fun Observable>.flatMap(block: (t: T, d: D) -> Observable): Observable { + return flatMap { block(it.first, it.second) } } fun Observable.pairWith(second: S, third: T): Observable> { @@ -25,7 +25,7 @@ fun Observable>.map(block: (f: F, s: S, t: T) -> return map { block(it.first, it.second, it.third) } } -fun Observable>.flatMap(block: (f: F, s: S, t: T) -> R): Observable { - return flatMap { Observable.just(block(it.first, it.second, it.third)) } +fun Observable>.flatMap(block: (f: F, s: S, t: T) -> Observable): Observable { + return flatMap { block(it.first, it.second, it.third) } }