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 LAA32739; Thu, 2 May 2002 11:50:52 +0200 (MET DST) 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 LAA32735 for ; Thu, 2 May 2002 11:50:51 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g429ooD14508; Thu, 2 May 2002 11:50:50 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g429ooa27561 ; Thu, 2 May 2002 11:50:50 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.9.2/jb-1.1) id LAA01504 ; Thu, 2 May 2002 11:50:49 +0200 (MET DST) Date: Thu, 2 May 2002 11:50:49 +0200 (MET DST) From: Alain Frisch To: Francois Pottier cc: caml-list@inria.fr Subject: Re: [Caml-list] Breaking out of iterative loops In-Reply-To: <20020502111422.A31527@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2 May 2002, Francois Pottier wrote: > The situation is different in the case of immutable structures. I > don't know of any situation where immutable, cyclic structures are > useful. FWIW, I used an immutable cyclic structure once in an interpreter for a functional language; here is the code that evaluate a recursive abstraction: let rec local' = (f,self)::local and self = Value.AbstrMatch (al,local',pl) in self The closure (self) contains the environment (local') that makes reference to the closure, hence the recursive definition. -- Alain ------------------- 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