Last active
January 3, 2016 00:49
-
-
Save erasmas/8385212 to your computer and use it in GitHub Desktop.
Drop every nth item from sequence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn [s n] | |
(keep-indexed | |
(fn [i v] (when (pos? (mod (inc i) n)) v)) | |
s)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment