[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SLOOP and "by #'..."
SLOOP will work fine with "by cddr". It fails with "by #'cddr".
Which is proper syntax? and if the latter, is there a fix?
I am pretty sure that by 'cddr by #'cddr or by joe
should all work. sloop.lsp was doing by 'cddr correctly,
but by joe was turning into (setf .. (joe ..))
This was wrong. It should become (setf .. (funcall joe ..)).
Thanks for pointing this out, and I hope people did not use
"by cddr" even though it `worked', since now it won't.
In sloop.lsp in parse-loop-for make the change in the by case:
(setq inc (loop-pop))
(setq from-data (add-from-data
from-data nil nil nil inc)))
(t (assert (eq (car (third incr)) 'cdr))
`(setf ,(second incr)
(funcall , inc ,(second incr)))))))