impc:ti:get-polyfunc-candidate   scheme


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

Implementation

;; takes a polyname and a type, and returns the (first)
;; poly'd over function with that type
;; remap impc:ir:check-poly
(define impc:ti:get-polyfunc-candidate
  (lambda (polyfunc-name func-type)
    (let loop ((candidates (impc:ti:get-polyfunc-candidate-list polyfunc-name)))
      (if (or (not candidates) (null? candidates))
          #f
          (if (equal? (vector-ref (car candidates) 1) func-type)
              (string->symbol (vector-ref (car candidates) 0))
              (loop (cdr candidates)))))))


Back to Index

Similar Entries