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

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

Re: problem with mapconcat


From: Thamer Mahmoud
Subject: Re: problem with mapconcat
Date: Wed, 03 Mar 2010 18:23:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Teemu Likonen <tlikonen@iki.fi> writes:

> * 2010-03-03 12:49 (UTC), Christian Wittern wrote:
>
>> I am trying to build a regex with lisp, which inserts a certain string
>> into another string between each character, for example "abc" should
>> turn into "a/b/c".
>
> (mapconcat #'identity (mapcar #'char-to-string "abc") "/")
>
> => "a/b/c"

Another alternative:

(mapconcat 'string (string-to-list "abc") "/")

=> "a/b/c"






reply via email to

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