You can do it without mod . I'm going to reverse the order of the arguments to make this more idiomatic.
dropEvery :: Int -> [a] -> [a] dropEvery n xs = map fst . filter ((/= n) . snd) $ zip xs (cycle [1..n])
If speed is critical, it is probably most efficient to use this technique with explicit recursion or foldr . Something like that:
dropEvery n xs = foldr go (`seq` []) xs n where go _ r 1 = rn go xrk = x : r (k - 1)
source share