This is the mail archive of the guile@sourceware.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: how to work with (weak) hash tables?


Valentin>                                    So, if I want to add one
Valentin> to each value of hash table `ht', I can write smth. like:

Valentin> (hash-fold (lambda (key value alist) (hashq-set! ht key (1+
Valentin> value))) () ht)

Valentin> It is sufficient for my purposes, but, nevertheless, is not
Valentin> there more effective way? I'd like to write smth. like

Valentin> 	(set! value (1+ value))

I'm sorry, I've found the answer in slib/hashtab.scm.

--
Best regards,
	Valentin.

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