"Tobias C. Rittweiler" tcr@freebits.de writes:
(mapcar #'+ '(1 2 3 4) '#1=(10 . #1#))
I figure that at least LOOP's for-as-in-list clause could be meaningfully used in the above manner. So rewriting the code in question is no problem. Still, it's something I'd like to find out what's the commonly shared opinion about this.
I do not like it, because it uses a tricky construct to achieve something simple. I would use something like
(mapcar (curry #'+ 10) list)
instead, where
(defun curry (func &rest args) "Supplies @arg{args} to @arg{func} from the left." #'(lambda (&rest after-args) (apply func (append args after-args))))
is a utility function.
Nicolas