fork download
  1. triangulate (x:a:b:xs) = scanl ((x, a, b) n -> (x, b, n)) xs (x, a, b)
  2. main = print $ triangulate $ [1, 2, 3, 4, 5, 6, 7]
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:1:44: parse error on input `->'
stdout
Standard output is empty