From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 12510BC6B for ; Tue, 3 Apr 2007 09:00:32 +0200 (CEST) Received: from postar.fmf.uni-lj.si (vega.fmf.uni-lj.si [193.2.67.45]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3370VZP002308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 3 Apr 2007 09:00:31 +0200 Received: from localhost (unknown [192.168.5.1]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 211691221BF; Tue, 3 Apr 2007 09:00:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at spam.fmf.uni-lj.si Received: from postar.fmf.uni-lj.si ([192.168.5.5]) by localhost (spam.fmf.uni-lj.si [192.168.5.1]) (amavisd-new, port 10024) with ESMTP id QWGjPRUKZcMi; Tue, 3 Apr 2007 09:18:45 +0200 (CEST) Received: from [192.168.1.100] (BSN-61-80-129.dial-up.dsl.siol.net [86.61.80.129]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 9B55E120679; Tue, 3 Apr 2007 09:00:26 +0200 (CEST) Message-ID: <4611FBAB.1020508@fmf.uni-lj.si> Date: Tue, 03 Apr 2007 09:00:59 +0200 From: Andrej Bauer Reply-To: Andrej.Bauer@andrej.com User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: caml-list Cc: Brian Hurt Subject: Re: [Caml-list] How important are circular lists/recursive objects? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4611FB8F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrej:01 andrej:01 recursive:01 recursive:01 closures:01 closures:01 wrote:01 caml-list:01 functions:01 data:02 structures:02 construct:02 objects:02 objects:02 programming:03 Brian Hurt wrote: > Does anyone actually use this construct, and if so, for what? When I teach my students "theory" of programming languages, we write interpreters for mini languages. The recursive data structures are used to create closures of recursive functions, environments that contain mutually recursive values, closures of objects, etc. Life would be very hard without this feature. Andrej