99-haskell-problems/Problems 11-20/problem_16.hs

3 lines
106 B
Haskell
Raw Normal View History

2024-05-24 18:50:16 -05:00
dropEvery :: [a] -> Int -> [a]
dropEvery l n = map snd . filter ((0 /=) . (`mod` n) . fst) $ zip [1 ..] l