#85
Power Set
 

Difficulty:Medium
Topics:set-theory


Write a function which generates the power set of a given set. The power set of a set x is the set of all subsets of x, including the empty set and x itself.
test not run
(= (__ #{1 :a}) #{#{1 :a} #{:a} #{} #{1}})
test not run
(= (__ #{}) #{#{}})
test not run
(= (__ #{1 2 3})
   #{#{} #{1} #{2} #{3} #{1 2} #{1 3} #{2 3} #{1 2 3}})
test not run
(= (count (__ (into #{} (range 10)))) 1024)


Code which fills in the blank: