Function: cl--self-tco-on-form

cl--self-tco-on-form is a byte-compiled function defined in cl-macs.el.gz.

Signature

(cl--self-tco-on-form VAR FORM)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-macs.el.gz
(defun cl--self-tco-on-form (var form)
  ;; Apply self-tco to the function returned by FORM, assuming that
  ;; it will be bound to VAR.
  (pcase form
    (`(function (lambda ,fargs . ,ebody)) form
     (pcase-let* ((`(,decls . ,body) (macroexp-parse-body ebody))
                  (`(,ofargs . ,obody) (cl--self-tco var fargs body)))
       `(function (lambda ,ofargs ,@decls . ,obody))))
    (`(let ,bindings ,form)
     `(let ,bindings ,(cl--self-tco-on-form var form)))
    (`(if ,cond ,exp1 ,exp2)
     `(if ,cond ,(cl--self-tco-on-form var exp1)
        ,(cl--self-tco-on-form var exp2)))
    (`(oclosure--fix-type ,exp1 ,exp2)
     `(oclosure--fix-type ,exp1 ,(cl--self-tco-on-form var exp2)))
    (_ form)))