[Top][All Lists]

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

Re: print out all members of a list, v.1.0

From: ken
Subject: Re: print out all members of a list, v.1.0
Date: Mon, 28 Feb 2011 13:25:10 -0500
User-agent: Thunderbird (X11/20101213)

Ughhh.  Finally, after reading many, many info pages and running a dozen
or so google searches and reading four or five that many web pages over
the past couple days, I found what I was after... mapconcat.  Still then
it took a bit of reading error messages and playing around with syntax,
but it's working.  All that for one line of code!

I've programmed in a lot of languages over the decades, but elisp
definitely has the steepest learning curve... prolly cuz it's so
hodge-podgey.  Well, this isn't a discussion I have time for.  I'm just
sayin', if not for emacs, elisp would be gone... and it might be gone
anyway in a generation or two.  I'll leave it to those who know the
language better than I to if/how to prevent that happening.

On 02/28/2011 12:21 PM ken 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).
> 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]