sbcl is idiotic, we have to take care how we call nthcdr with it.

Pascal J. Bourguignon [2021-05-01 21:43]
sbcl is idiotic, we have to take care how we call nthcdr with it.
Filename
common-lisp/cesarum/sequence.lisp
diff --git a/common-lisp/cesarum/sequence.lisp b/common-lisp/cesarum/sequence.lisp
index 792ab6a..596bf8a 100644
--- a/common-lisp/cesarum/sequence.lisp
+++ b/common-lisp/cesarum/sequence.lisp
@@ -304,7 +304,9 @@ whose concatenation is equal to SEQUENCE.")
     (check-type n (integer 1))
     (loop
       :for sub  := sequence :then rest
-      :for rest := (nthcdr n sub)
+      :for  rest := (nthcdr #+sbcl #| is idiotic! |#  (min (length sub) n)
+                            #-sbcl n
+                            sub)
       :while sub
       :collect (ldiff sub rest))))
ViewGit