[Q] Change forms like (delq nil (mapcar ...)) to (mapcan ...).
Stephen J. Turnbull
stephen at xemacs.org
Fri Sep 17 02:08:35 EDT 2010
QUERY
Aidan Kehoe writes:
> Replace the O2N (delq nil (mapcar (lambda (W) (and X Y)) Z)) with
> the ON (mapcan (lambda (W) (and X (list Y))) Z) in these files.
This can't work as written, can it? If X is nil, if Y is nil, it will
wrap nil in a list and the nil will not be deleted. I guess from a
quick look at the patch that it's expected that if X is non-nil, Y
will be non-nil, but are you sure?
I'm also not convinced that this is necessarily faster if (length Z)
is small, as the mapcan version involves extra consing.
More information about the XEmacs-Patches
mailing list