bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32841: assoc-set fails with dot notation association list


From: John Cowan
Subject: bug#32841: assoc-set fails with dot notation association list
Date: Thu, 27 Sep 2018 08:09:46 -0400



On Wed, Sep 26, 2018 at 11:03 PM Mark H Weaver <address@hidden> 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        address@hidden
Here lies the Christian, judge, and poet Peter,
Who broke the laws of God and man and metre.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]