unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* 'length' function for lists and cons cells?
@ 2013-03-21 18:21 Thorsten Jolitz
  2013-03-21 20:02 ` Stephen Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Thorsten Jolitz @ 2013-03-21 18:21 UTC (permalink / raw)
  To: help-gnu-emacs


Hi List, 

which function could I use when I map an alist e.g. with dolist, that
contains both types of associations as shown below: cons cells, or lists
with 3 or more elements?

'length' doesn't work on cons cells:

,------------------------
| (length '("a" "b" "c"))
| 3
`------------------------

,--------------------------------------------------------------
| (length '("a" . "c"))
| 
| Debugger entered--Lisp error: (wrong-type-argument listp "c")
|   length(("a" . "c"))
`--------------------------------------------------------------

-- 
cheers,
Thorsten





^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <mailman.22586.1363890109.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-03-25 20:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

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).