-- http://www.codewars.com/kata/551f23362ff852e2ab000037
module PyramidSlideDown where

longestSlideDown :: [[Int]] -> Int
longestSlideDown = head . foldr1 f where
  f ys xs = zipWith3 (\a b c -> a + max b c) ys xs (tail xs)