Created
March 2, 2017 04:41
-
-
Save ccorcos/57ea98a471656d47544bc9dc9685c82a 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
const maybe = parser => | |
new Parser(stream => | |
parser.run(stream) | |
.fold( | |
(v, s) => new Success(v, s), | |
(v, s) => new Success(null, stream))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment