-- Lexer
parseBin :: String -> Integer
parseBin = foldl (\l r -> l * 2 + (if r == '1' then 1 else 0)) 0
parseBin :: String -> Integer
parseBin = foldl (\l r -> l * 2 + (if r == '1' then 1 else 0)) 0
parseBin = foldl (\l r -> l * 2 + (if r == '1' then 1 else 0)) 0