Skip to content

Instantly share code, notes, and snippets.

@afsalthaj
Last active July 11, 2018 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afsalthaj/e7f0a2910c403d0cf04fcc6bb29de583 to your computer and use it in GitHub Desktop.
Save afsalthaj/e7f0a2910c403d0cf04fcc6bb29de583 to your computer and use it in GitHub Desktop.
trait Functor[F[_]] { self =>
def map[A, B](fa: F[A], f: A => B): F[B]
def xmap[A, B](fa: F[A], f: A => B, g: B => A) =
map(fa, f)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment