From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.help Subject: Re: problem with mapconcat Date: Thu, 04 Mar 2010 16:07:13 +0100 Message-ID: <4B8FCCA1.6040404@easy-emacs.de> References: <87bpf5zex5.fsf@mithlond.arda> <87635d5szl.fsf@zemblan.newkuwait.org> <871vg15s6r.fsf@zemblan.newkuwait.org> <4B8F630E.2040301@easy-emacs.de> <87eik0o2e6.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1267715174 5922 80.91.229.12 (4 Mar 2010 15:06:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 4 Mar 2010 15:06:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 04 16:06:10 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NnCcr-00005t-KJ for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Mar 2010 16:06:09 +0100 Original-Received: from localhost ([127.0.0.1]:40083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnCcr-0002AI-4X for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Mar 2010 10:06:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnCbj-0001qy-3p for help-gnu-emacs@gnu.org; Thu, 04 Mar 2010 10:04:59 -0500 Original-Received: from [140.186.70.92] (port=51501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnCbg-0001q1-SC for help-gnu-emacs@gnu.org; Thu, 04 Mar 2010 10:04:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NnCbf-0005PR-Gs for help-gnu-emacs@gnu.org; Thu, 04 Mar 2010 10:04:56 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:64287) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NnCbf-0005P8-6c for help-gnu-emacs@gnu.org; Thu, 04 Mar 2010 10:04:55 -0500 Original-Received: from [192.168.178.27] (p54BE84B7.dip0.t-ipconnect.de [84.190.132.183]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LjwS5-1NBNwz17Qf-00blJn; Thu, 04 Mar 2010 16:04:52 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <87eik0o2e6.fsf@escher.home> X-Provags-ID: V01U2FsdGVkX18U0rDQZ+hmu95kmk/jy3hZZQN0v8jYhZb9UQk s/hHKJP1mAWzrMSdC2qQCPoinfzms84xZk30JK/7OA0t85+V8W ewa8HOy0hYLrM7XCwaUr3U1w469oj2+7QGnLJM0LYE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72361 Archived-At: Stephen Berman wrote: > On Thu, 04 Mar 2010 08:36:46 +0100 Andreas Röhler wrote: > >> Thamer Mahmoud wrote: >>> Thamer Mahmoud 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