Scheme Union Of Two Lists

[Solved] Scheme Union Of Two Lists | Scheme - Code Explorer | yomemimo.com
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

Answers related to scheme union of two lists

Code Explorer Popular Question For Scheme