Last active
April 5, 2020 09:26
-
-
Save polyglotpiglet/b9f4340a7411a7ceb8141c586f8290d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Functor Laws: | |
1. Identity | |
fa.map(a => a) == fa | |
2. Composition | |
fa.map(f).map(g) = fa.map(g(f(_))) | |
*/ | |
trait MyFunctor[F[_]] { | |
def map[A, B](fa: F[A], f: A => B): F[B] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment