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: Matthieu Sozeau <mattam@a...>
Subject: Re: [Caml-list] "List.index" or "List.unique" functions?
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).
-- 
It's a small world, but I wouldn't want to have to paint it.
		-- Steven Wright

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