--- /dev/null
+#lang racket
+
+(define (adjoin-set x set)
+ (cond ((null? set) (cons x set))
+ ((= x (car set)) set)
+ ((< x (car set)) (cons x set))
+ ((> x (car set)) (cons (car set) (adjoin-set x (cdr set))))))
\ No newline at end of file
--- /dev/null
+#lang racket
+
+(define (union-set set1 set2)
+ (cond ((null? set1) set2)
+ ((null? set2) set1)
+ ((= (car set1) (car set2)) (cons (car set1) (union-set (cdr set1) (cdr set2))))
+ ((< (car set1) (car set2)) (cons (car set1) (union-set (cdr set1) set2)))
+ ((> (car set1) (car set2)) (cons (car set2) (union-set set1 (cdr set2))))))
\ No newline at end of file