All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.reactivex.rxkotlin.Singles.kt Maven / Gradle / Ivy

package io.reactivex.rxkotlin

import io.reactivex.Single
import io.reactivex.SingleSource
import io.reactivex.functions.BiFunction


object Singles {
    inline fun  zip(s1: SingleSource, s2: SingleSource, crossinline zipper: (T, U) -> R): Single
            = Single.zip(s1,s2, BiFunction { t, u -> zipper.invoke(t, u) })
}

inline fun  Single.zipWith(other: SingleSource, crossinline zipper: (T, U) -> R): Single
        = zipWith(other, BiFunction { t, u -> zipper.invoke(t, u) })