* Hashtable iter/remove
@ 2000-03-26 13:56 John Max Skaller
2000-03-29 13:25 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: John Max Skaller @ 2000-03-26 13:56 UTC (permalink / raw)
To: caml-list
Hashtables are mutable objects. What happens if
I iterate over a hashtable, applying Hashtble.remove
to (some of) the elements? Will this work?
--
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Hashtable iter/remove
2000-03-26 13:56 Hashtable iter/remove John Max Skaller
@ 2000-03-29 13:25 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2000-03-29 13:25 UTC (permalink / raw)
To: John Max Skaller, caml-list
> Hashtables are mutable objects. What happens if
> I iterate over a hashtable, applying Hashtble.remove
> to (some of) the elements? Will this work?
It will work in the sense that nothing will crash and you hashtable
will remain in a consistent state. However, some of the (key,data)
pairs you removed with Hashtbl.remove may still be presented later to
your iterated function.
- Xavier Leroy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-29 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-26 13:56 Hashtable iter/remove John Max Skaller
2000-03-29 13:25 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox