arrow-fx-rx2 / arrow.fx.rx2 / ObservableK


data class ObservableK<out A> : ObservableKOf<A>


<init> ObservableK(observable: Observable<out A>)


observable val observable: Observable<out A>


ap fun <B> ap(fa: ObservableKOf<(A) -> B>): ObservableK<B>
bracketCase A way to safely acquire a resource and release in the face of errors and cancellation. It uses ExitCase to distinguish between different exit cases when releasing the acquired <B> bracketCase(use: (A) -> ObservableKOf<B>, release: (A, ExitCase<Throwable>) -> ObservableKOf<Unit>): ObservableK<B>
concatMap fun <B> concatMap(f: (A) -> ObservableKOf<B>): ObservableK<B>
continueOn fun continueOn(ctx: CoroutineContext): ObservableK<A>
equals fun equals(other: Any?): Boolean
filterMap fun <B> filterMap(f: (A) -> Option<B>): ObservableK<B>
flatMap fun <B> flatMap(f: (A) -> ObservableKOf<B>): ObservableK<B>
foldLeft fun <B> foldLeft(b: B, f: (B, A) -> B): B
foldRight fun <B> foldRight(lb: Eval<B>, f: (A, Eval<B>) -> Eval<B>): Eval<B>
hashCode fun hashCode(): Int
map fun <B> map(f: (A) -> B): ObservableK<B>
runAsync fun runAsync(cb: (Either<Throwable, A>) -> ObservableKOf<Unit>): ObservableK<Unit>
runAsyncCancellable fun runAsyncCancellable(cb: (Either<Throwable, A>) -> ObservableKOf<Unit>): ObservableK<Disposable>
switchMap fun <B> switchMap(f: (A) -> ObservableKOf<B>): ObservableK<B>
traverse fun <G, B> traverse(GA: Applicative<G>, f: (A) -> Kind<G, B>): Kind<G, ObservableK<B>>

Companion Object Functions

async Creates a ObservableK that’ll run <A> async(fa: ObservableKProc<A>): ObservableK<A>
asyncF fun <A> asyncF(fa: ObservableKProcF<A>): ObservableK<A>
cancelable fun <A> ~~cancelable~~(fa: ((Either<Throwable, A>) -> Unit) -> CancelToken<ForObservableK>): ObservableK<A>
cancelableF fun <A> ~~cancelableF~~(fa: ((Either<Throwable, A>) -> Unit) -> ObservableKOf<CancelToken<ForObservableK>>): ObservableK<A>
cancellable Creates a ObservableK that’ll run a cancellable <A> cancellable(fa: ((Either<Throwable, A>) -> Unit) -> CancelToken<ForObservableK>): ObservableK<A>
cancellableF fun <A> cancellableF(fa: ((Either<Throwable, A>) -> Unit) -> ObservableKOf<CancelToken<ForObservableK>>): ObservableK<A>
defer fun <A> defer(fa: () -> ObservableKOf<A>): ObservableK<A>
invoke operator fun <A> invoke(fa: () -> A): ObservableK<A>
just fun <A> just(a: A): ObservableK<A>
raiseError fun <A> raiseError(t: Throwable): ObservableK<A>
tailRecM tailrec fun <A, B> tailRecM(a: A, f: (A) -> ObservableKOf<Either<A, B>>): ObservableK<B>

Companion Object Extension Functions

concurrent fun ObservableK.Companion.concurrent(dispatchers: Dispatchers<ForObservableK> = ObservableK.dispatchers()): Concurrent<ForObservableK>
fx fun <A> ObservableK.Companion.fx(c: suspend ConcurrentSyntax<ForObservableK>.() -> A): ObservableK<A>
monadConcat fun ObservableK.Companion.monadConcat(): ObservableKMonad
monadErrorConcat fun ObservableK.Companion.monadErrorConcat(): ObservableKMonadError
monadErrorFlat fun ObservableK.Companion.monadErrorFlat(): ObservableKMonadError
monadErrorSwitch fun ObservableK.Companion.monadErrorSwitch(): ObservableKMonadError
monadFlat fun ObservableK.Companion.monadFlat(): ObservableKMonad
monadSwitch fun ObservableK.Companion.monadSwitch(): ObservableKMonad

Do you like Arrow?

Arrow Org