This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scheme style auto-resizing hashtable (fwd)


On Thu, 19 Nov 1998, Jay Glascoe wrote:

> hmm.  I could make them destructive as well as functional.  ... I mean,
> "list"  will still be destroyed -- it's finally reduced to (()) --

this is better:

(set-car! el '())
(set-car! el el)

=> (#0#)

the result is a list, its car is a pair, so after

list->hash-table! list

"list" will still be an association list, but it won't have ownership over
any of its old associations.

 
 	Jay Glascoe
 	jglascoe@jay.giss.nasa.gov