#90
Cartesian Product
 

Difficulty:Easy
Topics:set-theory


Write a function which calculates the Cartesian product of two sets.
test not run
(= (__ #{"ace" "king" "queen"} #{"♠" "♥" "♦" "♣"})
   #{["ace"   "♠"] ["ace"   "♥"] ["ace"   "♦"] ["ace"   "♣"]
     ["king"  "♠"] ["king"  "♥"] ["king"  "♦"] ["king"  "♣"]
     ["queen" "♠"] ["queen" "♥"] ["queen" "♦"] ["queen" "♣"]})
test not run
(= (__ #{1 2 3} #{4 5})
   #{[1 4] [2 4] [3 4] [1 5] [2 5] [3 5]})
test not run
(= 300 (count (__ (into #{} (range 10))
                  (into #{} (range 30)))))


Code which fills in the blank: