diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-30 11:58:40 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-30 11:58:40 +0200 |
commit | 8f974b6dc2b0e73ab7486dcec52a0fc6656d9441 (patch) | |
tree | 41970c4f9d32febd82c88b213303c781e1ccf05c /util.lisp | |
parent | 78f516d6fb58405cb234ba22e8bebd44d4d2bdf1 (diff) |
TYPEP: Treat NIL as an atom, not as a cons.
Diffstat (limited to 'util.lisp')
-rw-r--r-- | util.lisp | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,5 +1,5 @@ (export '(and or not let* list* case cond append reverse macroexpand - otherwise unless when eq)) + otherwise unless when eq boundp)) (%defmacro %defun args @@ -207,3 +207,20 @@ (%shadowing-export eq) (%defun* eq (x y) (sys::eq x y)) + +(%defun* boundp (symbol) + (send-by-name (send-by-name (find-objc-class "MLKDynamicContext") + "currentContext") + "boundp:" + symbol)) + +(unless (boundp '+nil+) + (setq +nil+ (gensym))) + +(%defun* denullify (x) + (if (eq x +nil+) + nil + x)) + +(%defun* nullify (x) + (or x +nil+)) |