[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to copy hash table?
From: |
Mikael Djurfeldt |
Subject: |
Re: How to copy hash table? |
Date: |
Tue, 27 Jan 2004 10:29:54 -0500 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Roland Orre <address@hidden> writes:
> In earlier guiles, where hash-tables were vectors, I used copy-tree to
> copy a hash table. Now in guile-1.7 copy-tree of the hash-table gives me
> the same hash table back, which I assume is correct for atomic objects.
>
> What I want is a table where the handles are copies so when modifying the
> values in the new table it won't affect the original.
>
> I guess there exists no trick to generally copy objects.
>
> (Of course, for now, to overcome this I'm using hash-for-each but I'm
> curios about the general issue)
You're right that hash-for-each is currently the best way to do it.
Do people feel that we should have a primitive
hash-copy
?
M