Function: -if-let
-if-let is a macro defined in dash.el.
Signature
(-if-let (VAR VAL) THEN &rest ELSE)
Documentation
If VAL evaluates to non-nil, bind it to VAR and do THEN, otherwise do ELSE.
Note: binding is done according to -let.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defmacro -if-let (var-val then &rest else)
"If VAL evaluates to non-nil, bind it to VAR and do THEN,
otherwise do ELSE.
Note: binding is done according to `-let'.
\(fn (VAR VAL) THEN &rest ELSE)"
(declare (debug ((sexp form) form body))
(indent 2))
`(-if-let* (,var-val) ,then ,@else))