From 8f974b6dc2b0e73ab7486dcec52a0fc6656d9441 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 30 Jul 2008 11:58:40 +0200 Subject: TYPEP: Treat NIL as an atom, not as a cons. --- util.lisp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'util.lisp') 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+)) -- cgit v1.2.3