Get every nth element from a sequence in Clojure

less than 1 minute read

Notes

;; every_nth_element.clj

(def a-list (range 60))

(defn nth-elements [n coll]
  (map last (partition n coll)))

(nth-elements 12 a-list)

Updated: