Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Hashtable iter/remove
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-03-29 (17:24)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Hashtable iter/remove
> 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