Browse thread
[Caml-list] Breaking out of iterative loops
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alain Frisch <frisch@c...> |
| Subject: | Re: [Caml-list] Breaking out of iterative loops |
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