GNU bug report logs - #16963
A patch to create a list-with-tail primitive.

Previous Next

Package: emacs;

Reported by: Demetrios Obenour <demetriobenour <at> gmail.com>

Date: Fri, 7 Mar 2014 16:48:02 UTC

Severity: wishlist

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 16963 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 16963 <at> debbugs.gnu.org, Demetrios Obenour <demetriobenour <at> gmail.com>
Subject: RE: bug#16963: A patch to create a list-with-tail primitive.
Date: Thu, 27 Jun 2019 20:30:27 -0700 (PDT)
> Oh, this reminds me I had started writing a patch for this.  I used the
> name cons* instead of list* though, I always found it more logical:
> cons* is cons repeated, just like let* is let repeated.  Let me dust it
> off:

The name has long been `list*' in Lisp, including
in Common Lisp.  That's the name that should (still)
be used, IMO.

http://clhs.lisp.se/Body/f_list_.htm

  list* is like list except that the last argument to list
  becomes the car of the last cons constructed, while the
  last argument to list* becomes the cdr of the last cons
  constructed. Hence, any given call to list* always
  produces one fewer conses than a call to list with the
  same number of arguments.

  If the last argument to list* is a list, the effect is
  to construct a new list which is similar, but which has
  additional elements added to the front corresponding to
  the preceding arguments of list*.

  If list* receives only one object, that object is returned,
  regardless of whether or not it is a list.




This bug report was last modified 6 years and 43 days ago.

Previous Next


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