fork download
  1. a = [1..50]
  2. b = [1..]
  3.  
  4. each _ [] = []
  5. each n (x:xs) = x: (each n $ drop (n - 1) xs)
  6.  
  7. main = do
  8. print $ each 4 []
  9. print $ take 10 $ each 4 []
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:8:8:
    Ambiguous type variable `a' in the constraint:
      `Show a' arising from a use of `print' at prog.hs:8:8-12
    Probable fix: add a type signature that fixes these type variable(s)

prog.hs:9:8:
    Ambiguous type variable `a1' in the constraint:
      `Show a1' arising from a use of `print' at prog.hs:9:8-12
    Probable fix: add a type signature that fixes these type variable(s)
stdout
Standard output is empty