Skip to content

Instantly share code, notes, and snippets.

@ccorcos
Created March 2, 2017 04:39
Show Gist options
  • Save ccorcos/27235a8aaf0ad9bf04cbb677e582fb7d to your computer and use it in GitHub Desktop.
Save ccorcos/27235a8aaf0ad9bf04cbb677e582fb7d to your computer and use it in GitHub Desktop.
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