Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
isHex :: Word8 -> Bool
isHex w =
(w >= 48 && w <= 57) || -- '0' to '9'
(w >= 97 && w <= 102) || -- lower-case 'a' to 'f'
(w >= 65 && w <= 70) -- upper-case 'A' to 'F'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.