411 REFERENCE · Wikibooks
99 Elm Problems/Problem 16/Solutions
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Solution 1: Using List.foldr and List.indexedMap
dropEvery n list =
let
indexed = List.indexedMap (,) list
maybeAdd (i, x) xs =
if (i + 1) % n == 0 then xs else x :: xs
in
List.foldr maybeAdd [] indexed