[] = (Left ParseError, [])
[x:xs] = (Right x, xs)
+peek :: Parser a a
+peek = Parser \i -> case i of
+ [] = (Left ParseError, [])
+ [x:xs] = (Right x, [x:xs])
+
satisfy :: (a -> Bool) -> Parser a a
satisfy f = top >>= \r -> if (f r) (return r) fail
+check :: (a -> Bool) -> Parser a a
+check f = peek >>= \r -> if (f r) (return r) fail
+
item :: a -> Parser a a | Eq a
item a = satisfy ((==)a)