dash.el
dash.el copied to clipboard
bug: `-if-let` mismatch between documentation and behavior
The documentation for -if-let
reads as follows: If VAL evaluates to non-nil, bind it to VAR and do THEN, otherwise do ELSE.
However, -if-let
's behavior does not match this, and instead appears to match
against (part of) var
:
(-if-let ((foo . bar) '(3)) 'true 'false) ;; evals to 'false
(if '(3) 'true 'false) ;; evals to 'true
;; if-let macroexpands to:
(let ((--dash-source-98-- '(3)))
(if --dash-source-98--
(let ((foo (pop --dash-source-98--)))
(if foo ;; should be --dash-source-98--
(let ((bar --dash-source-98--))
(if bar 'true 'false))
'false))
'false))
Thanks for the great package!