Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Monad is a principle. Cheating on the principle is alleged to be helpful. It is pro-actively unhelpful.
trait Monad[F[_]] {
def flatMap[A, B](f: A => F[B]): F[A] => F[B]
def point[A]: A => F[A]
def filter[A](p: A => Boolean): F[A] => F[A] =
error("I will give you lots of money if you achieve this")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment