From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 0FB8FBBCA for ; Sun, 11 May 2008 17:02:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwBAL+nJkjVJFBbmWdsb2JhbACSCQEBAQEBCAUGCREDlns X-IronPort-AV: E=Sophos;i="4.27,469,1204498800"; d="scan'208";a="12468796" Received: from mx-out.libertysurf.net (HELO mail.libertysurf.net) ([213.36.80.91]) by mail3-smtp-sop.national.inria.fr with ESMTP; 11 May 2008 17:02:41 +0200 Received: from [192.168.1.2] (91.168.186.177) by mail.libertysurf.net (7.3.118.8) id 47F1FEBB00D2FD8B for caml-list@yquem.inria.fr; Sun, 11 May 2008 17:56:26 +0200 From: Florent Monnier Organization: l'Association Linux-Nantes To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Hashtbl.remove legal within Hashtbl.iter for the same hash table? Date: Sun, 11 May 2008 17:10:06 +0200 User-Agent: KMail/1.8.2 References: <87tzh5kxhl.fsf@linux-france.org> <200805111642.14164.fmonnier@linux-nantes.fr.eu.org> <9d3ec8300805110746s3b4ad089p9d6572a491403384@mail.gmail.com> In-Reply-To: <9d3ec8300805110746s3b4ad089p9d6572a491403384@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200805111710.06994.fmonnier@linux-nantes.fr.eu.org> X-Face: "RXbh'>3l!,Z~K9[.=}f[D{bea)>G??RYB%BP}f%u/=~]AJ0^_2c9&9Ds2h6=.x`i,#xlTI 9S\iD:y}Bz1xIee)R36u?Bh_Y.Ph}9bNyKlO\5Ic`1x~T Hatables are arrays of associative lists. When you are iterating over > them removing any element you have already visited should be ok. > Removing elements you haven't visited yet could cause you to encounter > them anyhow. which means that it is dependent to the order in which the content is itered, while the manual says : "The order in which the bindings are passed to f is unspecified."