help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print out all members of a list


From: ken
Subject: Re: print out all members of a list
Date: Mon, 28 Feb 2011 12:21:13 -0500
User-agent: Thunderbird 2.0.0.24 (X11/20101213)

On 02/28/2011 10:20 AM ken wrote:
> (car '("one" "two" "three"))
> 
> prints out "one" ... the first of the list.  How to print out all
> elements of the list (in order and with the double quotes around them?
> I'm actually looking just to substitute something for "car" and not
> write an entire function.  Or is there no such thing?
> 
> Thanks much.
> 

I've been criticized for my elisp terminology-- and properly so--, so
let me rephrase:

(car '("one" "two" "three"))

returns a string consisting of the first element (?) of the list.  Is
there an elisp function which either (1) returns one string for each
element of the list or (2) returns one string containing all elements of
the list?

E.g.:

(1) "one" "two" "three"

or

(2) "onetwothree"

preferably (1).


Thanks again.


P.S. It seems strange that elisp has so many ways to manipulate lists,
but doesn't seem to have this very simple functionality.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]