Non-decimal radices/Convert: Difference between revisions

m
(Added Haskell example)
Line 194:
toAlphaDigits = map convert where
convert n | n < 10 = chr (n + ord '0')
| otherwise = chr (n + ord 'a' - 10)
 
fromAlphaDigits :: String -> [Int]
Anonymous user