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

.avocado-zio-2_sjs1_3.0.2.0.source-code.zio2.scala Maven / Gradle / Ivy

The newest version!
package avocado.instances

import avocado.AvocADO
import zio.ZIO

object zio2 {
  given [E, R]: AvocADO[[X] =>> ZIO[E, R, X]] = new AvocADO[[X] =>> ZIO[E, R, X]] {
    def pure[A](a: A): ZIO[E, R, A] = ZIO.succeed(a)
    def map[A, B](fa: ZIO[E, R, A], f: A => B): ZIO[E, R, B] = fa.map(f)
    def zip[A, B](fa: ZIO[E, R, A], fb: ZIO[E, R, B]): ZIO[E, R, (A, B)] = fa.zipPar(fb)
    def flatMap[A, B](fa: ZIO[E, R, A], f: A => ZIO[E, R, B]): ZIO[E, R, B] = fa.flatMap(f)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy