module WithCallArity (doIt) where import Data.Char import DList go :: [Int] -> DString go [] = empty go (x:xs) = showInt x +++ singleton ' ' +++ go xs showInt :: Int -> DString showInt 0 = singleton '0' showInt n | n < 10 = singleton (intToDigit n) showInt n | otherwise = showInt (n `div` 10) +++ showInt (n `mod` 10) doIt :: [Int] -> String doIt xs = fromDList (go xs) main = putStrLn (fromDList (go (concat (replicate 10000 [0..10000]))))