impc:ti:intersection*   scheme


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

Implementation

;; impc:ti:intersection* is cl:intersection for
;; an arbirary number of sets (i.e. args)
;; also handles *impc:ir:other* which we want
;; to match against anything.
(define impc:ti:intersection*
  (lambda args
    (let loop ((a args)
               (res '()))
      (if (null? a)
          res
          (loop (cdr a)
                (if (null? res)
                    (car a)
                    (if (null? (car a))
                        res
                        (cl:intersection (car a) res))))))))


Back to Index