fork download
  1. main = interact nextGreatestFib;
  2.  
  3. nextGreatestFib x = show(x)
  4.  
  5. nextFib :: xs => xs -> [Int]
  6. nextFib xs.length < 2 xs : 1
  7. nextFib xs.length >= 2 xs : last(xs) + last(init(xs))
Compilation error #stdin compilation error #stdout 0s 4728KB
stdin
1
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:6:1:
    Parse error: naked expression at top level
    Perhaps you intended to use TemplateHaskell
stdout
Standard output is empty