Sunday, October 19, 2008

Clojure Golf: combinations (2)

(defn combinations [& cs]
(reduce #(for [v %1 i %2] (conj v i)) [[]] cs))

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.