Not "can", "should". And it might even survive in th world of Unicode.
On Dec 12, 2007 10:36 AM, Arie Groeneveld < bradypus@xs4all.nl> wrote:One can also use Data.Char.digitToInt in place of (flip (-) 48 . ord).Reinier Lamers schreef:>Most of the time I use this:
> printint :: Int -> [Char]
> printint = map chr . map (+0x30) . reverse . map (`mod` 10) .
> takeWhile (>0) . iterate (`div`10)
>
digits :: Integer -> [Int]
digits = map (flip(-)48.ord) . show
-Brent
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe