]> git.rmz.io Git - my-scheme.git/commit
Parse Atoms which start with a letter or symbol
authorSamir Benmendil <me@rmz.io>
Sun, 14 Jan 2018 00:19:18 +0000 (00:19 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 14 Jan 2018 00:19:18 +0000 (00:19 +0000)
commitd06e8ae01efc00ea0eb6f0bed346032b004aca57
tree28555314c14abcb901a7daccef7b36feafcd1673
parent10ec228b216032b4d61216414aef8b1e36cf151f
Parse Atoms which start with a letter or symbol

`<|>` is a Parser combinator, the choice operator. It will try the first
parser, if it doesn't match anything, try the second parser, and so on.

`a:b` creates a list from `a` and `b`. Another possibility would be to
use `[a] ++ b`, where a new list with a single element is created `[a]`
and concatenated with `++`
app/Main.hs