(define addelt (lambda(x s) (if (memberp x s) s (cons x s)))) ; (define union (lambda(s1 s2) (if (nullp s1) s2 (if (memberp (car s1) s2) (union (cdr s1) s2) (cons (car s1) (union (cdr s1) s2)))))) ; (define memberp (lambda(x s) (if (nullp s) false (if (equaln x (car s)) true (memberp x (cdr s)))))) ; |
Georg P. Loczewski 2004-03-05