]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex2_59.clj
Lazy version of evaluator and tests.
[sicp.git] / src / sicp / ex2_59.clj
1 (ns sicp.ex2_59
2   (:use [clojure.test]
3         [sicp.ch2_3]))
4
5 (defn union-set [set1 set2]
6   (cond (empty? set1) set2
7         (element-of-set? (first set1) set2) (union-set (rest set1) set2)
8         :else (cons (first set1) set2)))