Question : scheme union of two lists
Answered by : spotless-skunk-9s3znls36tiq
(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))
Source : https://stackoverflow.com/questions/42353424/scheme-union-two-lists | Last Update : Sun, 15 Mar 20