Problem 18
http://projecteuler.net/index.php?section=problems&id=18
--Haskell (Input data from STDIN), 20090101 process :: [Int] -> [Int] -> [Int] process f t = zipWith max (zipWith (+) f (init t) ++ [last t]) (head t : zipWith (+) f (tail t)) main = getContents >>= print . maximum . foldl1 process . map (map read . words) . lines