GNU bug report logs - #25826
26.0.50; cl-mapc and cl-mapl do needless consing

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Tue, 21 Feb 2017 08:06:01 UTC

Severity: wishlist

Found in version 26.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 25826 <at> debbugs.gnu.org
Subject: bug#25826: 26.0.50; cl-mapc and cl-mapl do needless consing
Date: Tue, 21 Feb 2017 08:40:18 -0500
Tino Calancha <tino.calancha <at> gmail.com> writes:

> Current implementation of cl-mapc (cl-mapl) uses `cl-mapcar'
> (`cl-maplist') when input contains > 1 sequence.  Thus,
> they cons the values and just discard then at the end.
>
> Following patch adds a defvar which acts as a flag for consing
> the values.  The flag is bind to nil in the case of `cl-mapc' and
> `cl-mapl'.

Is it possible to do this via a parameter instead?  Using a global
variable seems like asking for trouble in case of nested calls or
similar.




This bug report was last modified 8 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.