Closed mnepveu closed 1 year ago
Both your function circularlist
and your use alexandria:make-circular-list
loop forever on SBCL, ECL, and CCL as well, so I think there is a more fundamental issue going on that doesn't work with the semantics of Common Lisp in general. I must confess that having ALEXANDRIA's inferface not work surprises me as it is a ruggedly battle-tested library.
Closing this issue for now, but if you have more information on what you are trying to do OR if you find code that works on another implementation that works on the Bear, I would be happy to revisit.
Try setting *print-circle* to t
CL-USER> (setq *print-circle* t)
t
CL-USER> (alexandria:make-circular-list 1 :initial-element 1)
#1=(1 . #1#)
CL-USER> (defun circularlist (items)
(setf (cdr (last items)) items)
items)
circularlist
CL-USER> (circularlist (list 1 2 3))
#1=(1 2 3 . #1#)
An infinite loop is entered when attempting to create a circular list.
Environment: Armed Bear Common Lisp 1.9.3-dev Java 1.8.0_342 Temurin OpenJDK 64-Bit Server VM
Examples:
Or using Alexandria: