-- prog1.hs -- Glenn G. Chappell -- 3 Feb 2009 -- -- For CS 331 Spring 2009 -- Haskell Program for Assignment 1 Exercise A main = putStrLn out where d1 = [72,29,7,0,3,-79] d2 = [65,13,-10,-68,87,-18] d3 = [7,-9,12,-2,-8,-69] d4 = [84,-5,-79,35,16,-51] d5 = [19,0,-2,-17,33,50] d6 = [0,-10,-2,7,-1,-8] d7 = [9,6,-84,3,14,-16] diffs = concat[d1, d2, d3, d4, d5, d6, d7] thisAndAdd x xs = x : (map (+ x) xs) ords = foldr thisAndAdd [] diffs toChar n = toEnum (fromIntegral n) `asTypeOf` 'x' out = map toChar ords