Decide whether a string is an identifier, that is, whether it starts with an uppercase or lowercase letter and all other elements are all lowercase, uppercase, digit, or underscore characters.
isunderscore :: Char -> Bool
isunderscore a
|a == '_' = True
|otherwise = False
identifier :: String -> Bool
identifier (x:xs) = isLetter x && ( all isLetter xs || all isunderscore xs || all isDigit xs )
identifier _ = False