From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: Replace element in list Date: Mon, 2 Sep 2019 12:41:08 +0200 Message-ID: <20190902104107.GD1466@tuxteam.de> References: <6a632b18-bbd6-7096-229d-6c890b6bdb6f@easy-emacs.de> <20190902103723.GC1466@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gE7i1rD7pdK0Ng3j" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246870"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 02 12:41:26 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i4jlz-00127T-5Y for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Sep 2019 12:41:23 +0200 Original-Received: from localhost ([::1]:34994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4jlx-0003Ie-QD for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Sep 2019 06:41:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57304) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4jln-0003Ho-J2 for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 06:41:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4jlm-0008Ag-4F for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 06:41:11 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:40547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4jll-000897-6w for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 06:41:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=rLG2vPZp7v5LkuziIp2F+rc/D4wsJufL3PEAwY7/Ek4=; b=PDLepdciUh2PGzRXid3WaIllnYuinx5T897gR/+lk9pI2Z2fqjAStrfcpvwmeYrWofxqc2DZnscTZUpBOIwqpEgJUUudzi9pzbhPvHC1NfVLSFVtqNG4ce/dlFjbgo9/iUAhklpYQZuoW4di1WtBPhcpWx7DlbqRu3c1ecMgiYtIQsJYq/yvMMJDZmPnqyU0UEyq2FDIrun0qu5pxiOQSMkw4wKENOuxST1NVlKLEdzQ6VXTrDMgGQRLsPNdPpx5+3YFIkOvCgz5pFkKZD7PF6nw1vbYkcnZqUUJr/yd4SXjq04lWSsqQjNsGpmsfJo2gKILuYNgkxiy60ibSOjc/Q==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1i4jlk-0002Fh-1n for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 12:41:08 +0200 Content-Disposition: inline In-Reply-To: <20190902103723.GC1466@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121411 Archived-At: --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 02, 2019 at 12:37:23PM +0200, tomas@tuxteam.de wrote: > On Mon, Sep 02, 2019 at 11:44:10AM +0200, Andreas R=C3=B6hler wrote: > > Hi, > >=20 > > is there a recommended way to replace element x at index i of > > somelist=C2=A0 y by newelement? >=20 > Like this? >=20 > scheme@(guile-user)> (define lst (list-copy '(fire water air earth))) > scheme@(guile-user)> (list-set! lst 2 'mud) > $3 =3D mud > scheme@(guile-user)> lst > $4 =3D (fire water mud earth) Oops, sorry. Wrong language, wrong mailing list. Embarrasing. Cheers --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl1s8cMACgkQBcgs9XrR2kbkWgCfRjqjnR6QYS3g9Vya44zv45hd hokAn0eEoX4yYQcyWWPqy/Gz+Ob+AXJz =HeBg -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j--