Skip to content

Instantly share code, notes, and snippets.

@jamiltron
Created July 14, 2011 04:55
Show Gist options
  • Select an option

  • Save jamiltron/1081963 to your computer and use it in GitHub Desktop.

Select an option

Save jamiltron/1081963 to your computer and use it in GitHub Desktop.
Drop every nth-item
; 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