(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?))))))))