From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Setting the nth element of a list Date: Thu, 4 Jun 2009 15:06:08 -0700 Message-ID: References: <8a7c4d36-195d-4517-827e-7fbeca7ae03f@r34g2000vba.googlegroups.com> 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 1244161249 3868 80.91.229.12 (5 Jun 2009 00:20:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2009 00:20:49 +0000 (UTC) To: "=?iso-8859-1?Q?'Nordl=F6w'?=" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 05 02:20:46 2009 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 1MCNAr-0001A2-82 for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jun 2009 02:20:46 +0200 Original-Received: from localhost ([127.0.0.1]:48508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCNAp-0006nq-MK for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jun 2009 20:20:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCMjF-0007ha-9P for help-gnu-emacs@gnu.org; Thu, 04 Jun 2009 19:52:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCMj9-0007db-MF for help-gnu-emacs@gnu.org; Thu, 04 Jun 2009 19:52:11 -0400 Original-Received: from [199.232.76.173] (port=52860 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCMQK-0006wb-6t for help-gnu-emacs@gnu.org; Thu, 04 Jun 2009 19:32:40 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:33764) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MCL4Z-0006kO-1t for help-gnu-emacs@gnu.org; Thu, 04 Jun 2009 18:06:07 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n54M4kbZ005786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Jun 2009 22:04:48 GMT Original-Received: from abhmt003.oracle.com (abhmt003.oracle.com [141.146.116.12]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n54M7174009581; Thu, 4 Jun 2009 22:07:01 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Jun 2009 15:05:59 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <8a7c4d36-195d-4517-827e-7fbeca7ae03f@r34g2000vba.googlegroups.com> Thread-Index: AcnlXTPEnGH8HeKzTReqpQUyqJw9vwAAy7nQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt003.oracle.com [141.146.116.12] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020A.4A284548.006A:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:64950 Archived-At: > (setcar (cdr x 'b) > > How do I generalize this to a function that sets (changes) the nth > element of a list (for side effects only)? Use setcar with nthcdr.