user=> (take-nth 2 (range 10)) (0 2 4 6 8)
(defn take-nth "Returns a lazy seq of every nth item in coll." {:added "1.0"} [n coll] (lazy-seq (when-let [s (seq coll)] (cons (first s) (take-nth n (drop n s))))))
Comments top
No comments for take-nth. Log in to add a comment.