cl:assoc-union   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

;; with precedence to first lst
(define cl:assoc-union
  (letrec ((onion (lambda (lst1 lst2)
         (if (null? lst1)
       lst2
       (onion (cdr lst1) (cl:assoc-adjoin (car lst1) lst2))))))
     (lambda (lst1 lst2)
  (cond ((null? lst1) lst2)
        ((null? lst2) lst1)
        (else (onion (reverse lst2) lst1))))))


Back to Index