I noticed a thread on the clojure developer's google group last night,
http://groups.google.com/group/clojure-dev/browse_thread/thread/97e5fa7c49f457b2#

I first want to give my vote for including:
io
seq
string

I would also like to see seq include more functionality.  Two
examples, which I use a lot, are:

(defn drop-n [n col]
  "Works like nth, but instead of keeping only the nth term, this
keeps everything but the nth term."
  (concat (take (dec n) col) (drop n col)))


(defn flatten-n [n coll]
  "Like flatten, but only goes n levels deep."
  (if (= n 0)
    coll
    (recur (dec n) (apply concat (map #(if (sequential? %) % (list %))
coll)))))


There are also ideas for other seq functions at:
http://github.com/francoisdevlin/devlinsf-clojure-utils/blob/master/src/lib/sfd/seq_utils.clj

-- 
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