Skip to content

Instantly share code, notes, and snippets.

@ccorcos
Created March 2, 2017 04:41
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/0bf7456713a8add545178f344043080f to your computer and use it in GitHub Desktop.
Save ccorcos/0bf7456713a8add545178f344043080f to your computer and use it in GitHub Desktop.
const lookahead = parser =>
new Parser(stream =>
parser.run(stream)
.fold(
(v) => new Success(v, stream),
(v) => new Failure(v, stream)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment