Created
July 14, 2011 04:55
-
-
Save jamiltron/1081963 to your computer and use it in GitHub Desktop.
Drop every nth-item
This file contains 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
; Write a function that drops every nth item from a sequence | |
(fn drop-nth [lat n] | |
(flatten (map #(if (= (count %) n) (drop-last %) %) | |
(partition-all n lat)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment