all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* append - bug or feature?
@ 2010-07-27  4:05 TheFlyingDutchman
  2010-07-27  4:21 ` Barry Margolin
  0 siblings, 1 reply; 3+ messages in thread
From: TheFlyingDutchman @ 2010-07-27  4:05 UTC (permalink / raw)
  To: help-gnu-emacs

The documentation for append says:
_____________________________________________________
This function returns a list containing all the elements of sequences.
The sequences may be lists, vectors, bool-vectors, or strings, but the
last one should usually be a list. All arguments except the last one
are copied, so none of the arguments is altered.

More generally, the final argument to append may be any Lisp object.
The final argument is not copied or converted; it becomes the CDR of
the last cons cell in the new list. If the final argument is itself a
list, then its elements become in effect elements of the result list.
If the final element is not a list, the result is a "dotted list"
since its final CDR is not nil as required in a true list.
______________________________________________________

A "dotted list" will blow up functions like length and  append (if it
is not the last argument). Are there situations in which a "dotted
list" is more useful than a list - times when you would want to create
one?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-27 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27  4:05 append - bug or feature? TheFlyingDutchman
2010-07-27  4:21 ` Barry Margolin
2010-07-27 11:45   ` TheFlyingDutchman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.