Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created November 6, 2022 09:35
Embed
What would you like to do?
trait Functor[F[_]]
def map [A, B](fa: F[A])(f: A => B ): F[B]
trait Applicative[F[_]]
def ap [A, B](fa: F[A])(f: F[A => B]): F[B]
trait Monad[F[_]]
def bind [A, B](fa: F[A])(f: A => F[B]): F[B]
trait Contravariant[F[_]]
def contramap[A, B](fa: F[A])(f: B => A ): F[B]
trait Comonad[F[_]]
def cobind [A, B](fa: F[A])(f: F[A] => B ): F[B]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment