From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 21C97BB81 for ; Sun, 4 Dec 2005 05:11:14 +0100 (CET) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.200]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jB44BDUT013333 for ; Sun, 4 Dec 2005 05:11:13 +0100 Received: by xproxy.gmail.com with SMTP id i27so787699wxd for ; Sat, 03 Dec 2005 20:11:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:subject:date:to:x-mailer:from; b=GHFd3OiNVbWEPmkKiWP1qXaPSP7LLmVeiwVxsZQ+ihkuqaPKvAMht6bmcu/hS3FCW8/xzyg+4ApgTvQVvw+EgKFtGQRKJJr5XD7u3GYAqZbsN9YwMn4TNqtDIVTYmHxVtGQZUxMjBti/vFEYTDIKvDtOvie3bcgsALXSO8E3Zws= Received: by 10.70.30.13 with SMTP id d13mr5680571wxd; Sat, 03 Dec 2005 20:11:12 -0800 (PST) Received: from ?192.168.0.4? ( [70.18.210.51]) by mx.gmail.com with ESMTP id i15sm3067012wxd.2005.12.03.20.11.06; Sat, 03 Dec 2005 20:11:11 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <20051203002821.44840.qmail@web30515.mail.mud.yahoo.com> References: <20051203002821.44840.qmail@web30515.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Reporting on sucess/failure of tail recursion Date: Sat, 3 Dec 2005 23:11:06 -0500 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.746.2) From: Andres Varon X-Miltered: at nez-perce with ID 43926C61.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 recursion:01 ocamlopt:01 tailcall:01 stack:01 recursive:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 bug:01 wrote:01 wrote:01 sourceforge:01 tail:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 While exploring the (undocumented) options of ocamlopt I discovered once that -dlinear explicitly says if a function is a tailcall or not. It has worked consistently for me whenever I needed to check this afterwards. Andres On Dec 2, 2005, at 7:28 PM, David Thomas wrote: > Particularly with respect to list operations, > "non-tail-recursive" usually implies stack space used > is O(n) to the length of the list, whereas "tail > recursive" implies O(1). I, for one, would love to > see these figures explicitly, instead. > > --- skaller wrote: > >> What needs to be documented for a library function > is its >> complexity (time/space etc). In this sense the > documentation >> of the C++ Standard Library should be taken as an > examplar. > > > > > __________________________________ > Start your day with Yahoo! - Make it your home page! > http://www.yahoo.com/r/hs > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs