From: "Drew Adams" <drew.adams@oracle.com>
To: "'Thorsten Jolitz'" <tjolitz@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: 'length' function for lists and cons cells?
Date: Thu, 21 Mar 2013 15:05:16 -0700 [thread overview]
Message-ID: <4080986E7D894641B2B9A10FAF3FDCBC@us.oracle.com> (raw)
In-Reply-To: <871ub876us.fsf@gmail.com>
> actually I'm looking for a way to distinguish between cons cells and
> regular lists to avoid the errors when mapping an alist that contains
> both with functions that work only on one of them, using 'length' was
> just a hack.
You distinguish them by the way they are distinguished ;-), i.e., by whether the
cdr of the last cons cell is non-nil.
A true list is either nil or a cons that has a true list as its cdr. This
implies that it has nil as the cdr of its last cons.
See my previous message.
next prev parent reply other threads:[~2013-03-21 22:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 18:21 'length' function for lists and cons cells? Thorsten Jolitz
2013-03-21 20:02 ` Stephen Berman
2013-03-21 21:58 ` Thorsten Jolitz
2013-03-21 22:05 ` Drew Adams [this message]
[not found] ` <mailman.22591.1363903134.855.help-gnu-emacs@gnu.org>
2013-03-23 11:24 ` Pascal J. Bourguignon
2013-03-21 20:10 ` Drew Adams
2013-03-21 22:09 ` Thorsten Jolitz
[not found] ` <mailman.22588.1363896620.855.help-gnu-emacs@gnu.org>
2013-03-25 15:24 ` duthen.cnv
2013-03-25 20:02 ` Pascal J. Bourguignon
[not found] <mailman.22586.1363890109.855.help-gnu-emacs@gnu.org>
2013-03-21 20:49 ` Pascal J. Bourguignon
2013-03-22 2:38 ` Thorsten Jolitz
2013-03-22 7:27 ` Mark Skilbeck
2013-03-22 9:57 ` Thorsten Jolitz
[not found] ` <mailman.22632.1363946271.855.help-gnu-emacs@gnu.org>
2013-03-23 12:19 ` Pascal J. Bourguignon
2013-03-23 15:35 ` Drew Adams
[not found] ` <mailman.22706.1364052941.855.help-gnu-emacs@gnu.org>
2013-03-23 15:52 ` Pascal J. Bourguignon
2013-03-24 5:20 ` Drew Adams
[not found] ` <mailman.22618.1363919920.855.help-gnu-emacs@gnu.org>
2013-03-22 7:45 ` Barry Margolin
2013-03-23 11:31 ` Pascal J. Bourguignon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4080986E7D894641B2B9A10FAF3FDCBC@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tjolitz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).