From 3315cc8fc77bd27997983d787bd8f5c8f6f18fd6 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 9 Aug 2008 20:33:46 +0200 Subject: Add CHAR=, EQL, NTHCDR, LAST, and NTH. --- types.lisp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'types.lisp') diff --git a/types.lisp b/types.lisp index c1bf8c7..e99c188 100644 --- a/types.lisp +++ b/types.lisp @@ -26,7 +26,7 @@ array simple-array simple-vector simple-string simple-bit-vector sequence two-way-stream stream echo-stream broadcast-stream file-stream synonym-stream string-stream - concatenated-stream deftype typecase etypecase)) + concatenated-stream deftype typecase etypecase char= eql)) (setq *subtype-supertypes-dict* @@ -200,3 +200,15 @@ `(typecase ,expression ,@cases (otherwise (error "~A fell through ETYPECASE expression" expression)))) + + +(defun char= (x y) + (send-by-name x "isEqual:" y)) + +(defun eql (x y) + (typecase x + (number (and (numberp y) + (= x y)) + (character (and (characterp y) + (char= x y))) + (t (eq x y))))) -- cgit v1.2.3