Function: -as->

-as-> is a macro defined in dash.el.

Signature

(-as-> VALUE VARIABLE &rest FORMS)

Documentation

Starting with VALUE, thread VARIABLE through FORMS.

In the first form, bind VARIABLE to VALUE. In the second form, bind VARIABLE to the result of the first form, and so forth.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defmacro -as-> (value variable &rest forms)
  "Starting with VALUE, thread VARIABLE through FORMS.

In the first form, bind VARIABLE to VALUE.  In the second form, bind
VARIABLE to the result of the first form, and so forth."
  (declare (debug (form symbolp body)))
  (if (null forms)
      `,value
    `(let ((,variable ,value))
       (-as-> ,(if (symbolp (car forms))
                   (list (car forms) variable)
                 (car forms))
              ,variable
              ,@(cdr forms)))))