Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: c22582cbeb
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (9 sloc) 0.348 kB
dropEvery [] _ = []
dropEvery xs n = (take (n-1) xs) ++ dropEvery (drop n xs) n
---- using zip, seems like sth to avoid
dropEvery' = flip $ \n -> map snd . filter ((n/=) . fst) . zip (cycle [1..n])
---- rewritten in a fairly imperative way
dropEvery'' xs n = c where
a = zip (cycle [1..n]) xs
b = filter ((n/=) . fst) a
c = map snd b
Jump to Line
Something went wrong with that request. Please try again.