Created
March 2, 2017 04:39
-
-
Save ccorcos/27235a8aaf0ad9bf04cbb677e582fb7d 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
char('a') | |
.bimap( | |
v => v, | |
e => 'character was not an a' | |
) | |
.run('b') | |
.fold( | |
v => console.log('success', v) | |
e => console.log('error', e) | |
) | |
// => error character was not an a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment