fork download
  1. reverse :: [a] -> [a]
  2. reverse [] = []
  3. reverse (x:xs) = reverse' xs ++ [x]
  4.  
  5. main = print(reverse [1,2,3,6])
  6.  
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:3:18:
    Not in scope: reverse'
    Perhaps you meant one of these:
      `reverse' (line 2), `reverse' (imported from Prelude)

prog.hs:5:14:
    Ambiguous occurrence `reverse'
    It could refer to either `Main.reverse', defined at prog.hs:2:1
                          or `Prelude.reverse',
                             imported from `Prelude' at prog.hs:1:1
                             (and originally defined in `GHC.List')
stdout
Standard output is empty