
7 Apr
2015
7 Apr
'15
11:32 a.m.
This has nothing to do with show.
And it's already there
h> fst (floatToDigits 26 500) [19,6]
Oh, wait. Scratch that. You have to (++ (mantissa digits)), and it's only for RealFloat's.
Example: λ> showIntAtBaseGeneric 26 id (:) 500 [] -- convert 500 to base26 and provide output as a list. [19,6]
But what's wrong with just :: Integral a => Int -> a -> [Int] ?