You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My first thought is that a function to cast non-t to nil (like partially applied eq t) would accomplish the same thing without needing to introduce macros.
A function should also work and if we inline it there should be no performance penalty.
I can do the PR if you tell me which functions you want and with which name.
It should look like this then?
(defunif-t (test then &optional else)
"If TEST evaluates to T, evaluate THEN and return its values,otherwise evaluate ELSE and return its values. ELSE defaults to NIL."
(if test
(if (eq test t)
then
else)
else))
(declaim (inline if-t))
Sometime conditionals that test for
t
instead of non-nil are desired.In this situation it might be convenient to have:
if-t
,when-t
,cond-t
or maybe evenor-t
andand-t
.What do you think? @ruricolist
The text was updated successfully, but these errors were encountered: