Skip to content

Instantly share code, notes, and snippets.

@dnaumenko
Created February 3, 2020 09:33
Show Gist options
  • Save dnaumenko/98abb8ff38033bce8cff7d95123058b9 to your computer and use it in GitHub Desktop.
Save dnaumenko/98abb8ff38033bce8cff7d95123058b9 to your computer and use it in GitHub Desktop.
trait Env[Ctx, +A] {
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