You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps what we're really looking for here is a combinator that wraps this ? It looks like a pattern that should be captured (pun intended :)) on a higher level.
Often it's necessary to run a parser inside another parser. It's usually done with something like this:
It would be nice to have a function
parseOnlyM
which runs a parser and callsfail
onLeft
result. It can be implemented in this way:Which would allow to simplify the first example to following:
What do you think about such addition? I would be happy to make a PR.
The text was updated successfully, but these errors were encountered: