Skip to content

Instantly share code, notes, and snippets.

@dnaumenko
Created February 11, 2020 12:28
Show Gist options
  • Save dnaumenko/27f7a0384d3df25adb6cd6881c21685f to your computer and use it in GitHub Desktop.
Save dnaumenko/27f7a0384d3df25adb6cd6881c21685f to your computer and use it in GitHub Desktop.
trait Env[Ctx, +A] {
def run: RIO[Ctx, A]
// basic transformations
def map[B](f: A => B): Env[Ctx, B]
def flatMap[B](f: A => Env[Ctx, B]): Env[Ctx, B]
def void: Env[Ctx, Unit] = map(_ => ())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment