English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Mututal Recursion and Tail Recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-18 (00:56)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Mututal Recursion and Tail Recursion
From: Jonathan Bryant <jtbryant@valdosta.edu>

> 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...)


Jacques Garrigue