emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mapc vs while


From: Dave Love
Subject: Re: mapc vs while
Date: 26 Nov 2000 21:32:07 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.92

>>>>> "DN" == Dan Nicolaescu <address@hidden> writes:

 DN> Is it preferable to replace them with:

 DN> (mapc (lambda (x)
 DN>    ... ...)
 DN>    lst)

 DN> Is there an official position on this? 

I would guess that rms's position would be `There's no reason to
change this; leave it alone.'  [I've changed some occurrences to
`mapcar' to `mapc' in places to reduce consing where it might be
worthwhile.]

 DN> It would be nice to have a note about such usage in the NEWS
 DN> file.

If it's worth saying, it should go in the Lisp manual.  However, I
think that already makes the point about function calls being slow,
which would be a reason not to introduce a lambda.

[If you're writing code that should run in Emacs 20 (e.g. Gnus), don't
use mapc, of course.]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]