`<|>` 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 `++`
char '"'
return $ String x
+parseAtom :: Parser LispVal
+parseAtom = do
+ a <- letter <|> symbol
+ b <- many (letter <|> digit <|> symbol)
+ return $ Atom (a:b)
+
readExpr :: String -> String
readExpr input = case parse (spaces >> symbol) "lisp" input of
Left err -> "No match: " ++ show err