bind-func   macro


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

Implementation

(define-macro (bind-func . args)
  (if (< (length args) 2)
      (impc:compiler:print-compiler-error "Poorly formed bind-func expression"))
  (if (and (= (length args) 2) (not (symbol? (car args))) (not (or (string? (cadr args)) (list? (cadr args)))))
      (impc:compiler:print-compiler-error "Poorly formed bind-func expression"))
  (if (and (= (length args) 3)
           (not (symbol? (car args)))
           (not (symbol? (cadr args)))
           (not (or (string? (caddr args))
                    (list (caddr args)))))
      (impc:compiler:print-compiler-error "Poorly formed bind-func expression"))
  (if (equal? (car args) 'static)
      `(bind-static ,@(cdr args))
      `(bind-closure ,@args)))


Back to Index

Similar Entries