3 ms·
You can easily change that behavior if you really want to. (in-package :my-package) (shadow 'if) (defmacro if (condition then else) `(cl:if (true? ,condition
by lisper 9y ago
You can easily change that behavior if you really want to.
(in-package :my-package)
(shadow 'if)
(defmacro if (condition then else) `(cl:if (true? ,condition) ,then ,else))
(defgeneric true? (thing) t)
Defining appropriate defmethods to make things work the way you want is left as an exercise.
- kazinator 9y agoHowever, wanting to is rather a problem for the psychiatrist's couch.
- lisper 9y agoWhy? I actually agree with the OP that conflating the empty list and the boolean false value is a mistake. (I don't think it's enough of a big deal for me to want to change it, but in a perfect world I do think it is better to distinguish them.)