Skip to content

Instantly share code, notes, and snippets.

@imeredith
Created November 15, 2012 08:12
Show Gist options
  • Save imeredith/4077334 to your computer and use it in GitHub Desktop.
Save imeredith/4077334 to your computer and use it in GitHub Desktop.
implicit val PromiseInstance = new Monad[Promise] {
def point[A](a: => A) = Promise.pure(a)
def bind[A, B](fa: Promise[A])(f: A => Promise[B]) = fa.flatMap(f)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment