Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] "List.index" or "List.unique" functions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] "List.index" or "List.unique" functions?
Matthieu Sozeau wrote:
> On Fri, Apr 30, 2004 at 12:08:56PM -0700, Karl Zilles wrote:
> 
>>List.rev is not tail recursive, so you wouldn't want to use this 
>>function on industrial size lists.
> 
> 
> List.rev and List.rev_map are tail recursive, unlike map. It can be
> really benefical sometimes to use an accumulator in a recursive
> function and reverse it at the end (it certainly wouldn't if List.rev
> was not tail recursive).

You're right.  Not sure how that got into my head.  Thanks for the 
correction.

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