1 module BinTest (main) where 2 3 main = putStr (show (result 1000)) 4 5 result 0 = [] 6 result n = codes_to_ascii (3077, 1192) ++ result (n-1) 7 8 codes_to_ascii (x,y) 9 = x_div : ((x_rem * 16) + y_div) : [y_rem] 10 where 11 (x_div, x_rem) = divRem x 16 12 (y_div, y_rem) = divRem y 256 13 14 divRem x y = (x `div` y, x `rem` y) -- missing from PreludeCore ?