I\'m new in haskell and I\'m looking for some standard functions to work with lists by indexes.
My exact problem is that i want to remove 3 elements after every 5. If i
Here is my solution:
remElements step num=rem' step num where rem' _ _ []=[] rem' s n (x:xs) |s>0 = x:rem' (s-1) num xs |n==0 = x:rem' (step-1) num xs |otherwise= rem' 0 (n-1) xs
example:
*Main> remElements 5 3 [1..20] [1,2,3,4,5,9,10,11,12,13,17,18,19,20]