summaryrefslogtreecommitdiff
path: root/util.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-30 11:58:40 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-30 11:58:40 +0200
commit8f974b6dc2b0e73ab7486dcec52a0fc6656d9441 (patch)
tree41970c4f9d32febd82c88b213303c781e1ccf05c /util.lisp
parent78f516d6fb58405cb234ba22e8bebd44d4d2bdf1 (diff)
TYPEP: Treat NIL as an atom, not as a cons.
Diffstat (limited to 'util.lisp')
-rw-r--r--util.lisp19
1 files changed, 18 insertions, 1 deletions
diff --git a/util.lisp b/util.lisp
index c06305f..2bde209 100644
--- a/util.lisp
+++ b/util.lisp
@@ -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+))