📜  两个列表的方案联合 - 方案代码示例

📅  最后修改于: 2022-03-11 14:44:44.814000             🧑  作者: Mango

代码示例1
(define (union a b)
  (cond ((null? b) a)
        ((member (car b) a)
         (union a (cdr b)))
        (else (union (cons (car b) a) (cdr b)))))

(union '(1 2 3) '(2 4 2))