[movitz-devel] unfold-circular-list
    Willem Broekema 
    metawilm at gmail.com
       
    Sat Nov 28 09:18:23 UTC 2009
    
    
  
There's a bug in unfold-circular-list, in that it calls subseq on a
circular list: subseq is defined as taking a "proper sequence". Below
is a patch.
- Willem
diff --git a/parse.lisp b/parse.lisp
index 4ee75b9..ab711b9 100644
--- a/parse.lisp
+++ b/parse.lisp
@@ -46,7 +46,7 @@
     (loop for x on list as i upfrom 0
 	as cdr-index = (find-cdr list (cdr x) i)
 	until cdr-index
-	finally (return (values (subseq list 0 (1+ i))
+	finally (return (values (loop repeat (1+ i) collect (pop list))
 				cdr-index)))))
 (defun symbol-package-fix-cl (symbol)
    
    
More information about the movitz-devel
mailing list