triangulate (x:a:b:xs) = scanl (curry (snd *** id)) (a, b) xsmain = print $ triangulate $ [1, 2, 3, 4, 5]
Standard input is empty
[1 of 1] Compiling Main ( prog.hs, prog.o ) prog.hs:1:43: Not in scope: `***'
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!