Commit fbffe9ff3cc92c2e823a571cf0e5a28471ba7a4f

Thomas de Grivel 2023-07-11T13:59:44

fixed bug in cl-compare

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/compare.lisp b/compare.lisp
index fdddfa9..5cf6e99 100644
--- a/compare.lisp
+++ b/compare.lisp
@@ -63,6 +63,12 @@
         ((string= a b) 0)
         (t 1)))
 
+(defmethod compare ((a null) (b string))
+  -1)
+
+(defmethod compare ((a string) (b null))
+  1)
+
 (defmethod compare ((a cons) (b cons))
   (ecase (compare (car a) (car b))
     (-1 -1)