import Data.Listeach n = unfoldr $ \xs -> do (x:_) <- Just xs; Just (x, drop n xs) main = do print $ each 4 []
Standard input is empty
[1 of 1] Compiling Main ( prog.hs, prog.o ) prog.hs:4:10: Ambiguous type variable `a' in the constraint: `Show a' arising from a use of `print' at prog.hs:4:10-14 Probable fix: add a type signature that fixes these type variable(s)
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!