From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Flaschen Newsgroups: gmane.emacs.help Subject: Re: adding a string to every element in a list Date: Mon, 17 Nov 2008 01:06:43 -0500 Message-ID: <492109F3.6040002@gatech.edu> References: <1226901075.25203.2782.camel@localhost> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226902042 16072 80.91.229.12 (17 Nov 2008 06:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 06:07:22 +0000 (UTC) To: Matt Price , emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 17 07:08:23 2008 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.50) id 1L1xHY-0002rA-Sq for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2008 07:08:21 +0100 Original-Received: from localhost ([127.0.0.1]:32827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1xGQ-0004NT-Ez for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2008 01:07:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1xG9-0004N0-BE for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 01:06:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1xG6-0004Jw-S2 for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 01:06:51 -0500 Original-Received: from [199.232.76.173] (port=56187 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1xG6-0004Jt-Lk for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 01:06:50 -0500 Original-Received: from deliverator5.ecc.gatech.edu ([130.207.185.175]:45398) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1xG6-0006Nb-Ev for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 01:06:50 -0500 Original-Received: from deliverator5.ecc.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id A65ED180101; Mon, 17 Nov 2008 01:06:46 -0500 (EST) Original-Received: from mailprx1.gatech.edu (mailprx1.prism.gatech.edu [130.207.171.15]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.mail.gatech.edu", Issuer "Equifax" (verified OK)) by deliverator5.ecc.gatech.edu (Postfix) with ESMTP id 6A79F1800F8; Mon, 17 Nov 2008 01:06:45 -0500 (EST) Original-Received: from [128.61.81.101] (r81h101.res.gatech.edu [128.61.81.101]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (sasl: method=PLAIN, username=mflaschen3@mailprx1.gatech.edu, sender=n/a) by mailprx1.gatech.edu (Postfix) with ESMTP id 1D1032314; Mon, 17 Nov 2008 01:06:45 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) User-Agent: Thunderbird 2.0.0.17 (X11/20080925) In-Reply-To: <1226901075.25203.2782.camel@localhost> X-Enigmail-Version: 0.95.7 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:59854 Archived-At: Matt Price wrote: > i have no doubt this is trivial in lisp, but my documentation searches always take > me back to cons, car, and cdr, which don't seem like the easiest tools > for this task, though maybe it's just that i don't really understan > recursion... Just use mapcar, and it will handle the recursion: (setq list (list "dog" "cat" "fish")); (mapcar (lambda (arg) (concat arg "food")) list) Matt Flaschen