ajmorgan
6/5/2014 - 9:12 PM

set combinations reduce into

set combinations reduce into

(defn power-set [s]
  (reduce (fn [s e] (into s (map #(conj % e) s))) #{#{}} s))