Function: cond-let--thread$

cond-let--thread$ is a macro defined in cond-let.el.

Signature

(cond-let--thread$ FORM FORM...)

Documentation

Bind variable $ to value of nth FORM before evaluating nth+1 FORM.

Evaluate the first FORM and bind the symbol $ to its value. Then evaluate the next FORM with that binding in effect. Repeat this process with subsequent FORMs, and return the value of the last FORM.

Source Code

;; Defined in ~/.emacs.d/elpa/cond-let-20260817.452/cond-let.el
(defmacro cond-let--thread$ (form form2 &rest forms)
  "Bind variable `$' to value of nth FORM before evaluating nth+1 FORM.

Evaluate the first FORM and bind the symbol `$' to its value.
Then evaluate the next FORM with that binding in effect.  Repeat this
process with subsequent FORMs, and return the value of the last FORM.

\(fn FORM FORM...)"
  (declare (indent 0)
           (debug t))
  `(,(if forms 'let* 'let)
    (($ ,form)
     ,@(and forms
            (mapcar (lambda (form)
                      `($ ,form))
                    (cons form2 (butlast forms)))))
    ,(or (car (last forms))
         form2)))