lukewilliamboswell / roc-parser

A simple Parser for Roc
https://lukewilliamboswell.github.io/roc-parser/
Universal Permissive License v1.0
29 stars 11 forks source link

How to ignore result of a parser? #2

Open aloussase opened 11 months ago

aloussase commented 11 months ago

For example, in Haskell I can do something like:

string "Game " >> digits ...

I tried using ignore, but it doesn't seem to do what I want:

ignore (string "Game ") |> \_ -> digits ...

What would be the correct way to do it?

lukewilliamboswell commented 11 months ago

I just published a new release to update the documentation with a lot of worked examples.

Short answer is you can use skip.

Can you please look at the docs for this pacakge and let me know if this is easy enough to find the answer to your question in there?