Function: -if-let*
-if-let* is a macro defined in dash.el.
Signature
(-if-let* VARS-VALS THEN &rest ELSE)
Documentation
If all VALS evaluate to true, bind them to their corresponding VARS and do THEN, otherwise do ELSE. VARS-VALS should be a list of (VAR VAL) pairs.
Note: binding is done according to -let*. VALS are evaluated
sequentially, and evaluation stops after the first nil VAL is
encountered.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defmacro -if-let* (vars-vals then &rest else)
"If all VALS evaluate to true, bind them to their corresponding
VARS and do THEN, otherwise do ELSE. VARS-VALS should be a list
of (VAR VAL) pairs.
Note: binding is done according to `-let*'. VALS are evaluated
sequentially, and evaluation stops after the first nil VAL is
encountered."
(declare (debug ((&rest (sexp form)) form body))
(indent 2))
(->> vars-vals
(--mapcat (dash--match (car it) (cadr it)))
(--reduce-r-from
(let ((var (car it))
(val (cadr it)))
`(let ((,var ,val))
(if ,var ,acc ,@else)))
then)))