cps.stream.monix.ObservableEmitAbsorber.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cps-async-connect-monix_sjs1_3 Show documentation
Show all versions of cps-async-connect-monix_sjs1_3 Show documentation
cps-async-connect: integration of dotty-cps-async with effect stacks
package cps.stream.monix
import cps.monads.monix.{*,given}
import monix.eval.*
import monix.execution.*
import monix.reactive.*
import cps.*
import cps.stream.*
import scala.concurrent.*
given ObservableEmitAbsorber[T](using ExecutionContext): BaseUnfoldCpsAsyncEmitAbsorber[Observable[T],Task, CpsMonadInstanceContextBody[Task], T] with
override type Element = T
def asSync(task: Task[Observable[T]]): Observable[T] =
Observable.fromTask(task).flatten
def unfold[S](s0:S)(f:S => Task[Option[(T,S)]]):Observable[T] =
Observable.unfoldEval[S,T](s0)(f)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy