]> git.rmz.io Git - my-scheme.git/commit
Ignore spaces
authorSamir Benmendil <me@rmz.io>
Sat, 13 Jan 2018 23:24:30 +0000 (23:24 +0000)
committerSamir Benmendil <me@rmz.io>
Sat, 13 Jan 2018 23:24:30 +0000 (23:24 +0000)
commit429ac1845f1b93f54bca8511a4efbf8cbcbb9bf3
treeb6af354925e1884368b1cb186911099a3127eb35
parentb95d19b43830747d76eab4c01805ef531e897795
Ignore spaces

We add the spaces `Parser` which returns nothing `()` and skips any
spaces.

`spaces` is already defined in Parsec, but does not do exactly what we
want, we can hide it from the import.

`skipMany a` matches 0 or more `a` and skips them.

`>>` is the **bind** operator. It may have completely different meanings
depending on the monad you use. In the Parser monad in means "try the
first parameter, then try the second with anything that is left", i.e.
"first skip all the spaces, then match the symbol".
app/Main.hs