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
[Caml-list] tree walking with... specular rec functions? what else?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-11 (16:02)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] tree walking with... specular rec functions? what else?
> I've a simple tree structure and I want to walk it. Since in such a
> simple tree structure I can go AFAIK only sidewards or
> upwards/downwards, and I need to do both, I guess what can be an
> efficent way to do so.

That sounds like a job for Gérard Huet's "zippers":

G. Huet. The Zipper. Journal of Functional Programming, 7 (5), Sept
1997, pp. 549--554.

Apparently, the paper isn't freely available on-line, but see

for a quick overview of the zipper, and more advanced stuff.

- Xavier Leroy

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: