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/3f720e1626137ac34ba0c7ae9e03e1c0 to your computer and use it in GitHub Desktop.
Save ccorcos/3f720e1626137ac34ba0c7ae9e03e1c0 to your computer and use it in GitHub Desktop.
char('a')
.chain(v1 =>
char('b')
.chain(v2 =>
char('c')
.map(v3 => [v1, v2, v3])
)
)
.run('abc')
.fold(
v => console.log('success', v)
e => console.log('error', e)
)
// => success ['a', 'b', 'c']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment