Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mariussoutier/1217174 to your computer and use it in GitHub Desktop.
Save mariussoutier/1217174 to your computer and use it in GitHub Desktop.
;; msoutier's solution to Drop Every Nth Item
;; https://4clojure.com/problem/41
(fn [coll n]
(keep-indexed #(if (not= 0 (mod (inc %1) n)) %2 nil) coll))
@mariussoutier
Copy link
Author

59 chars seems ok, but apparently you can do even shorter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment