From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.bugs Subject: bug#32841: assoc-set fails with dot notation association list Date: Thu, 27 Sep 2018 08:09:46 -0400 Message-ID: References: <87zhw3d4na.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000aa43b80576d937d2" X-Trace: blaine.gmane.org 1538050146 1613 195.159.176.226 (27 Sep 2018 12:09:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2018 12:09:06 +0000 (UTC) Cc: 32841@debbugs.gnu.org, Christopher.Hood@gtri.gatech.edu To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Sep 27 14:09:01 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5V6L-0000Ig-Eu for guile-bugs@m.gmane.org; Thu, 27 Sep 2018 14:09:01 +0200 Original-Received: from localhost ([::1]:35502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5V8R-0006Vb-Se for guile-bugs@m.gmane.org; Thu, 27 Sep 2018 08:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5V8M-0006VR-Np for bug-guile@gnu.org; Thu, 27 Sep 2018 08:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5V8I-0005XS-Ph for bug-guile@gnu.org; Thu, 27 Sep 2018 08:11:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5V8I-0005W8-KB for bug-guile@gnu.org; Thu, 27 Sep 2018 08:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g5V8I-0004nT-6S for bug-guile@gnu.org; Thu, 27 Sep 2018 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Cowan Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 27 Sep 2018 12:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32841 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 32841-submit@debbugs.gnu.org id=B32841.153805020518363 (code B ref 32841); Thu, 27 Sep 2018 12:11:02 +0000 Original-Received: (at 32841) by debbugs.gnu.org; 27 Sep 2018 12:10:05 +0000 Original-Received: from localhost ([127.0.0.1]:55964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5V7N-0004m6-6A for submit@debbugs.gnu.org; Thu, 27 Sep 2018 08:10:05 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:39293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5V7L-0004lU-4I for 32841@debbugs.gnu.org; Thu, 27 Sep 2018 08:10:04 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id s14-v6so2324816wrw.6 for <32841@debbugs.gnu.org>; Thu, 27 Sep 2018 05:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X+SzF5UbGZF5HyGUwXm7mMCOgXILPVHyPDa3NbMIFrk=; b=wJqaPZCoPikw55KmlGI2spRmypvnC1b89cfASOlHbBx+X2PFdA4g513lYIgevN1s/4 7l9kxQQXpnFJPc4KCa7WoojCWmsG70oPg2IB5+XB9iWD4xyzDcm1xA0gdSQQbgWt66jU eXdiHfXudc9KkvbPf7zm9PTWiq+cN8R9VIYBtNJl+0Ic7KB1EXrlcRGJ4WEGdid8davt yzPLoRp+U3I0Hmw1y+Oc9VarXTQWH9RHz1dKX8tTPOgvzswbS03LkgjEGrGnuNecOLa7 feRoACpqCzW0wuavFGVLdnblzul5BZj8oSlbTDR8kmdJ1a6YHSsFgAmPR/CYsgAlX+jS WKLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X+SzF5UbGZF5HyGUwXm7mMCOgXILPVHyPDa3NbMIFrk=; b=ZdtToAJh95WV7oegaDBZxT3Tdx4ZnJUN6WHOScv2k+BXaeHULZpzUcPsbl95bha2/a +CU50zfWF+lBrUZQQRdA/TSqBg0BUSmp680CKskNUDSpssPRIhrfSXibhBUIHusGqUse jl6Y+WHgg/og3hCzzIPA71jZwhiuahLwryfKHkQUqrHgqoibKsNWz6NF3eWEYvvydcmR 6ycenj/appuFc6YG8lz5OuO21V35CiJ6GRKZKs0DRCKO64RF5UHfZkwXh7E6XEKeWz3H TrKMFwGTGEOjgkISZLStIkN+umnaIQ+CAZwlLO7lq0wMT/y7nLfhfgghtaL8GF1vYuzG Sgzg== X-Gm-Message-State: ABuFfohHAOKG3XR6Gvi8Q7AAYmiEYMMOFh8p4vlTqXP0e/8W2dL/6m7T 4Yye+4COo3jCk6dBsd02q9348o3saRyf8/tjl19Npg== X-Google-Smtp-Source: ACcGV61kQ9L97XTJRCDDWnQg8lknx0evF3mAY1RW/J3NRIQbwfi37KNKX9EzE+R4KVQFGQxrUzkb5LPyP4m5DXcLAZ0= X-Received: by 2002:adf:e5c7:: with SMTP id a7-v6mr8732274wrn.190.1538050197432; Thu, 27 Sep 2018 05:09:57 -0700 (PDT) In-Reply-To: <87zhw3d4na.fsf@netris.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9176 Archived-At: --000000000000aa43b80576d937d2 Content-Type: text/plain; charset="UTF-8" On Wed, Sep 26, 2018 at 11:03 PM Mark H Weaver wrote: > To initialize an alist that will be mutated, you must instead do > something like this: > > (define capitals (list (cons "New York" "Albany") > (cons "Oregon" "Salem") > (cons "Florida" "Miami"))) > More simply, you can wrap the literal in a call to copy-tree. This returns a deep copy of the literal that is fully mutable. -- John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Here lies the Christian, judge, and poet Peter, Who broke the laws of God and man and metre. --000000000000aa43b80576d937d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Sep 26, 2018 at 11:03 PM Mark H Weaver <mhw@netris.org> wrote:
=C2=A0
To initialize an alist that will be mutated, you must instead do
something like this:

=C2=A0 (define capitals (list (cons "New York" "Albany"= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(cons "Oregon"=C2=A0 =C2=A0"Salem") =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(cons "Florida"=C2=A0 "Miami")))

More simply, you can wrap the literal in a c= all to copy-tree.=C2=A0 This returns
a deep copy of the literal t= hat is fully mutable.

--=C2=A0
John= Cowan=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://vrici.lojban.org/~cowan=C2=A0 =C2=A0 =C2=A0 =C2=A0 cowan@ccil.org
Here lies the Ch= ristian, judge, and poet Peter,
Who broke the laws of God and man= and metre.

--000000000000aa43b80576d937d2--