a = [1..50]b = [1..] aion [] ld = ldaion ls ld = (head ls) : ld skipEachN _ [] = []skipEachN n l = aion dl $ skipEachN n dl where dl = drop n l main = do print $ skipEachN 5 a print $ take 10 $ skipEachN 5 b
Standard input is empty
[6,11,16,21,26,31,36,41,46] [6,11,16,21,26,31,36,41,46,51]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!