From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA06338; Wed, 15 Jan 2003 20:54:15 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA06620 for ; Wed, 15 Jan 2003 20:54:14 +0100 (MET) Received: from mg.ihep.su (mg.ihep.su [194.190.161.38]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0FJsDr19102 for ; Wed, 15 Jan 2003 20:54:13 +0100 (MET) Received: by mg.ihep.su (Postfix, from userid 65436) id 3367EB59D5; Wed, 15 Jan 2003 22:54:12 +0300 (MSK) Received: from ontil.ihep.su (ontil.ihep.su [194.190.161.63]) by mg.ihep.su (Postfix) with ESMTP id 12CF6B59C3; Wed, 15 Jan 2003 22:54:11 +0300 (MSK) Received: by ontil.ihep.su (Postfix, from userid 1001) id 4DDAF67B0; Wed, 15 Jan 2003 22:54:10 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by ontil.ihep.su (Postfix) with ESMTP id 4B46067AD; Wed, 15 Jan 2003 22:54:10 +0300 (MSK) Date: Wed, 15 Jan 2003 22:54:10 +0300 (MSK) From: Vitaly Lugovsky To: james woodyatt Cc: The Trade Subject: Re: [Caml-list] let rec In-Reply-To: <687F778F-28BF-11D7-9380-000393BA7EBA@wetware.com> Message-ID: References: <687F778F-28BF-11D7-9380-000393BA7EBA@wetware.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 15 Jan 2003, james woodyatt wrote: > Try this: > > let rec f (il,al,ht) = > let il2 = Array.make (n2+1) Lnil in > acopy il il2; > Array.iteri (fun i x -> il2.(all.(i)) <- x) al; > xprs (il2,anul,ht) > and xprs x = > (Hashtbl.replace ht name (CTfun(f)); > compile_exprs env2 exprs) x in > f It's not a same implementation. :( Hashtbl.replace should be executed only in the "compilation-time", not after the closure 'f' call. And, ht and env2 should be eliminated completely from the 'f' execution environment... ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners