Forked from anonymous/msoutier-4clojure-solution41.clj
Created
September 14, 2011 17:29
-
-
Save mariussoutier/1217174 to your computer and use it in GitHub Desktop.
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
;; 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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
59 chars seems ok, but apparently you can do even shorter.