impc:ti:polytype-match?   scheme


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

Implementation

(define impc:ti:polytype-match?
  (lambda (t1 t2)
    (if (<> (length t1)
            (length t2))
        #f
        (if (member #f (map (lambda (t1 t2)
                              (if (atom? t1)
                                  (set! t1 (list t1)))
                              (if (atom? t2)
                                  (set! t2 (list t2)))
                              (if (null? (impc:ti:intersection* t1 t2))
                                  #f
                                  #t))
                            t1
                            t2))
            #f
            #t))))


Back to Index