Ticket #859 (closed defect: fixed)
A bug in CL:EVERY with list (rest list).
Reported by: | pjb@… | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | IDE | Version: | 1.6 |
Keywords: | every | Cc: |
Description
Here is what is expected:
[pjb@kuiper :0 swig]$ clisp -norc -ansi -q [1]> (defun diff1p (lon)
(every (lambda (a b)
(print (list a b (= 1 (- a b)))) (= 1 (- a b)))
lon (rest lon)))
DIFF1P [2]> (diff1p '(6 5 4 3 2 1))
(6 5 T) (5 4 T) (4 3 T) (3 2 T) (2 1 T) T [3]> (quit)
Here is what we get with ccl:
[pjb@kuiper :0 swig]$ ccl -norc Welcome to Clozure Common Lisp Version 1.6-RC1-r14432M (LinuxX8664)! ? (defun diff1p (lon)
(every (lambda (a b)
(print (list a b (= 1 (- a b)))) (= 1 (- a b)))
lon (rest lon)))
DIFF1P ? (diff1p '(6 5 4 3 2 1))
(6 5 T) (4 5 NIL) NIL ? (quit) [pjb@kuiper :0 swig]$ ccl --version Version 1.6-RC1-r14432M (LinuxX8664)
Change History
comment:1 Changed 5 years ago by pjb@…
- Summary changed from A bug in CL:EVERY with two sequences. to A bug in CL:EVERY with list (rest list).
comment:2 Changed 5 years ago by gb
- Status changed from new to closed
- Resolution set to fixed
(In [14788]) In SOME-XX-MULTI, traverse the list of sequences in a way that doesn't require us to try to find the current sequence via MEMQ; this could affect the wrong sequence if some sequences shared structure (and wasn't the smartest thing to do even if they didn't.) Fixes ticket:859.