Created
May 28, 2017 11:13
-
-
Save choonkending/993a7eb25efde1e37e0e7642a27b805c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const Left = x => ({ | |
map: f => Left(x), | |
fold: (ifLeft, ifRight) => ifLeft(x) | |
}); | |
const Right = x => ({ | |
map: f => Right(f(x)), | |
fold: (ifLeft, ifRight) => ifRight(x) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment