fork download
  1. each :: (Show a) => Int -> [a] -> [a]
  2. each _ [] = []
  3. each n (x:xs) = x: each n (drop (n-1) xs)
  4.  
  5. main = print $ each 1 []
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:5:15:
    Ambiguous type variable `a' in the constraint:
      `Show a' arising from a use of `each' at prog.hs:5:15-23
    Probable fix: add a type signature that fixes these type variable(s)
stdout
Standard output is empty