a = [1..50]b = [1..] aion [] ld = ldaion ls ld = (head ls) : ld skipEachN _ [] = []skipEachN n l = aion l $ skipEachN n dl where dl = drop n l main = do print $ skipEachN 4 a print $ take 10 $ skipEachN 4 b
Standard input is empty
[1,5,9,13,17,21,25,29,33,37,41,45,49] [1,5,9,13,17,21,25,29,33,37]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!