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 SAA22457; Sun, 11 May 2003 18:02:46 +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 SAA22234 for ; Sun, 11 May 2003 18:02:45 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4BG2hH00330; Sun, 11 May 2003 18:02:43 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA22577; Sun, 11 May 2003 18:02:42 +0200 (MET DST) Date: Sun, 11 May 2003 18:02:42 +0200 From: Xavier Leroy To: Stalkern 2 Cc: caml-list@inria.fr Subject: Re: [Caml-list] tree walking with... specular rec functions? what else? Message-ID: <20030511180242.A21831@pauillac.inria.fr> References: <200305091156.47892.stalkern2@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <200305091156.47892.stalkern2@tin.it>; from stalkern2@tin.it on Fri, May 09, 2003 at 11:56:47AM +0200 X-Spam: no; 0.00; caml-list:01 downwards:01 huet:01 sept:99 uni-bonn:01 ralf:01 afaik:01 rec:01 tree:02 gerard:02 stuff:05 functions:05 structure:06 functional:06 guess:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 http://www.informatik.uni-bonn.de/~ralf/publications/TheWeb.ps.gz for a quick overview of the zipper, and more advanced stuff. - Xavier Leroy ------------------- 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