You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back in the 1990s I remember finding a bug in the queues code. Since I've lost the email and forgotten the problem, I'll try to reconstruct it now.
The code in chapter10.md appears to be unchanged from pp. 342-343 of the scanned pdf of the book.
queue-nconc looks wrong on the case when q is empty and list is null: after running (queue-nconc (make-queue) nil), the queue structure will be (nil . nil), which is not a valid queue representation (the car should point back to the queue structure itself).
I think the other 3 cases for queue-nconc are OK (q is nonempty or list is nonnull), but I haven't checked carefully.
The other functions look right -- I sketched box-and-pointer graphs before and after for the cases where q is empty or nonempty.
The text was updated successfully, but these errors were encountered:
Back in the 1990s I remember finding a bug in the queues code. Since I've lost the email and forgotten the problem, I'll try to reconstruct it now.
The code in chapter10.md appears to be unchanged from pp. 342-343 of the scanned pdf of the book.
queue-nconc
looks wrong on the case whenq
is empty andlist
is null: after running(queue-nconc (make-queue) nil)
, the queue structure will be(nil . nil)
, which is not a valid queue representation (the car should point back to the queue structure itself).I think the other 3 cases for
queue-nconc
are OK (q is nonempty or list is nonnull), but I haven't checked carefully.The other functions look right -- I sketched box-and-pointer graphs before and after for the cases where q is empty or nonempty.
The text was updated successfully, but these errors were encountered: