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 15:43:42 +0200 Message-ID: <20190902134342.GG1466@tuxteam.de> References: <6a632b18-bbd6-7096-229d-6c890b6bdb6f@easy-emacs.de> <jwvmufmhloq.fsf-monnier+emacs@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Sw7tCqrGA+HQ0/zt" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="219400"; 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 15:44:02 2019 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> 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 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1i4mcj-000uxF-N5 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Sep 2019 15:44:01 +0200 Original-Received: from localhost ([::1]:36724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1i4mci-0005GN-Bj for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Sep 2019 09:44:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53463) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <tomas@tuxteam.de>) id 1i4mcV-0005Fl-N7 for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 09:43:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <tomas@tuxteam.de>) id 1i4mcT-0003EH-DZ for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 09:43:47 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:40950) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <tomas@tuxteam.de>) id 1i4mcS-0003Am-Kg for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 09:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=2haLWEkq3qMndUgMygSTV7Yg56LXKpiWEQCvMOScfPw=; b=XILin6AyfJ/nHu6Ts/xz1hqw4YeydhHCRDlhpDN0oM3e8sbI9P+CMhIxIJeOBJC0cnRG9Li1YaXeC7czHeuBlpaRaUZfynev0J+N9fIn+4Q90gJzySKL9gczbuMKXqd+YfM5dfOX4+XPTfNQTplhblyepoM9ePcfmnlGauYBWcSyzPz+rpiw3dR7IeF1GL8xz0RbB05I9DIZ4HKFBp6V04rKup8lpvG3Dsxp6QHoxPSK+GfNlaTI5TMiethHH4eIphMWv2ed8O8EDd9Jbs0eint0qlZ5G/UVpnXyDucWJqF43ANbXHK8qiFUf9kh8ybFKajj5MyeL9vAiSWJKuYU/w==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from <tomas@tuxteam.de>) id 1i4mcQ-00045O-Fb for help-gnu-emacs@gnu.org; Mon, 02 Sep 2019 15:43:42 +0200 Content-Disposition: inline In-Reply-To: <jwvmufmhloq.fsf-monnier+emacs@gnu.org> 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 <help-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.help:121422 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/121422> --Sw7tCqrGA+HQ0/zt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 02, 2019 at 09:29:39AM -0400, Stefan Monnier wrote: > > is there a recommended way to replace element x at index i of somelist= =C2=A0 > > y by newelement? >=20 > What Thomas is hinting at with his "copy-list" and "functional sector" > is that if you need to do that, there's a problem upstream. > E.g. could you use a struct instead of a list? Thanks for putting my mumbling into civilised words :-) Cheers -- t --Sw7tCqrGA+HQ0/zt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl1tHI4ACgkQBcgs9XrR2kY9qgCffqtztzYOvP38JZGMlbi15mH2 NE0An04FVMZziaMQLCpM7DaXI8nXfHUI =fUKf -----END PGP SIGNATURE----- --Sw7tCqrGA+HQ0/zt--