[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SLOOP and BY #'step-fun
Well, one more time. SLOOP does not handle the example on page 720 of CLtLII
correctly:
(loop for item in '(1 2 3 4 5) by #'cddr do (print item)
-------The following patch will fix the problem-------------------------------*** sloop.lsp.orig Wed Apr 3 13:25:25 1991
--- sloop.lsp Tue Apr 16 11:42:27 1991
***************
*** 772,778 ****
(t (assert (eq (car (third incr)) 'cdr))
(setq incr
`(setf ,(second incr)
! (, inc ,(second incr)))))))
(below
(setq from-data (add-from-data from-data
var nil (loop-pop) nil '+)))
--- 772,778 ----
(t (assert (eq (car (third incr)) 'cdr))
(setq incr
`(setf ,(second incr)
! (funcall ,inc ,(second incr)))))))
(below
(setq from-data (add-from-data from-data
var nil (loop-pop) nil '+)))