From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 7E97DBCAF for ; Mon, 18 Jul 2005 02:56:14 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6I0uDMo012618 for ; Mon, 18 Jul 2005 02:56:14 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA20828 for ; Mon, 18 Jul 2005 02:56:13 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6I0uBse012614 for ; Mon, 18 Jul 2005 02:56:12 +0200 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j6I0u9vB024377; Mon, 18 Jul 2005 09:56:09 +0900 (JST) Date: Mon, 18 Jul 2005 09:56:05 +0900 (JST) Message-Id: <20050718.095605.74495093.garrigue@math.nagoya-u.ac.jp> To: jtbryant@valdosta.edu Cc: caml-list@inria.fr Subject: Re: [Caml-list] Mututal Recursion and Tail Recursion From: Jacques Garrigue In-Reply-To: <1121429733.25450.5.camel@starlight.valdosta.edu> References: <1121281425.30107.36.camel@starlight.valdosta.edu> <17111.23105.448745.536629@gargle.gargle.HOWL> <1121429733.25450.5.camel@starlight.valdosta.edu> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 42DAFE2D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42DAFE2B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 recursion:01 recursion:01 recursive:01 recursive:01 cheers:01 ...:98 wrote:01 tail:01 tail:01 slower:01 short:01 functions:01 jacques:01 jacques:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: From: Jonathan Bryant > Ok, I don't know enough about assembly to know exactly what that means, > although I think that you mean they are tail recursive. The whole > reason I wrote this tiny module was to do that tail recursive since the > List module isn't. How does one submit code updates to INRIA for things > like this? There are already lots of tail-recursive replacements for the List module, most notably the one included in Extlib. So if you need to handle very long lists you can already use them. The common problem for all these replacements is that they are slower than the original (non tail-recursive) functions, particularly for short lists, which are the most frequent ones. So there is no need to submit this code :-) (But I wonder whether it would not be a good idea to include a Safelist module in the standard library...) Cheers, Jacques Garrigue