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

2 lines
106 B
Haskell

dropEvery :: [a] -> Int -> [a]
dropEvery l n = map snd . filter ((0 /=) . (`mod` n) . fst) $ zip [1 ..] l