[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with mapconcat
From: |
Andreas Röhler |
Subject: |
Re: problem with mapconcat |
Date: |
Thu, 04 Mar 2010 16:07:13 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Stephen Berman wrote:
> On Thu, 04 Mar 2010 08:36:46 +0100 Andreas Röhler
> <andreas.roehler@easy-emacs.de> wrote:
>
>> Thamer Mahmoud wrote:
>>> Thamer Mahmoud <thamer.mahmoud@gmail.com> writes:
>>>> Another alternative:
>>>>
>>>> (mapconcat 'string (string-to-list "abc") "/")
>>>>
>>>> => "a/b/c"
>>> After sending the above, I realized that this would work too:
>>>
>>> (mapconcat 'string "abc" "/")
>>>
>>>
>>>
>>>
>>>
>> That seems to work either, whats strange for me:
>>
>> (mapconcat 'list "abc" "/")"a/b/c"
>
> Maybe this helps clarify why that works:
>
> (let (r)
> (dolist (e (string-to-list "abc") r)
> (setq r (concat r (if (null r) "" "/") (list e)))))
>
> Steve Berman
>
>
>
>
Thanks. Assumed wrongly result type of mapconcat follows function applied.
But it's concat which defines the result type, as function name says...
Andreas
Re: problem with mapconcat, Dan Davison, 2010/03/04
Re: problem with mapconcat, Kevin Rodgers, 2010/03/04