Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Helper Function isHex
- isHex :: Char -> Bool
- isHex x | ((y >= '0') && (y <= '9')) || ((y >= 'a') && (y <= 'f')) = True
- | otherwise = False
- where y = toLower x
- g :: String -> Int
- g xs | length [ f x | x <- xs, isHex x ] > 0 = maximum [ f x | x <- xs, isHex x ]
- | otherwise = -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement