import Control.Arrow
triangulate (x:a:b:xs) = scanl (curry (snd *** id)) (a, b) xs
main = print $ triangulate $ [1, 2, 3, 4, 5]