Skip to content

Instantly share code, notes, and snippets.

@ccorcos
Created March 2, 2017 04:39
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 ccorcos/c68c7b4762a341874a43dbadff2cb75e to your computer and use it in GitHub Desktop.
Save ccorcos/c68c7b4762a341874a43dbadff2cb75e to your computer and use it in GitHub Desktop.
char('a')
.chain(v => char('b'))
.chain(v => char('c'))
.run('abc')
.fold(
v => console.log('success', v)
e => console.log('error', e)
)
// => success c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment