Hello everybody,
 I just needed a function for every-nth element in a sequence.. I know it
can be trivially implemented as ..

(defn every-nth [n coll]
  (letfn [(evn [cn s]
            (when s
              (if (= cn 1)
                (lazy-seq (cons (first s) (evn n (next s))))
                (evn (dec cn) (next s)))))]
    (evn n coll)))

But I remember seeing inbuilt function .. can anybody help me find it?
Sunil.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to