diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-09 20:33:46 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-09 20:38:25 +0200 |
commit | 3315cc8fc77bd27997983d787bd8f5c8f6f18fd6 (patch) | |
tree | ffd1c6fe19f1926c9db01cc4bd2f2499c5a236e3 /types.lisp | |
parent | b3a91b0f038fed2807f5e393187692245e6a51ee (diff) |
Add CHAR=, EQL, NTHCDR, LAST, and NTH.
Diffstat (limited to 'types.lisp')
-rw-r--r-- | types.lisp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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))))) |