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: PJ Weisberg
Subject: Re: print out all members of a list
Date: Mon, 28 Feb 2011 12:26:00 -0800

On 2/28/11, ken <address@hidden> wrote:
> 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).

I'm not sure what (1) would actually *mean*, since a list of three
strings is what you already have, but if you did want to print each of
them out, then perhaps something like

(mapc 'insert '("one" "two" "three"))

-PJ



reply via email to

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