impc:ti:binary-arity   scheme


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

Implementation

(define impc:ti:binary-arity
  (lambda (ast inbody?)
    (let ((op (car ast))
          (inlst (cdr ast)))
      (if (< (length inlst) 2)
          (impc:compiler:print-bad-arity-error ast))
      (let loop ((rest (cddr inlst))
                 (lst (list op
                            (impc:ti:first-transform (car inlst) inbody?)
                            (impc:ti:first-transform (cadr inlst) inbody?))))
        (if (null? rest) lst
            (loop (cdr rest) (list op lst (impc:ti:first-transform (car rest) inbody?))))))))


Back to Index

Similar Entries