Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-04-30 (19:40)
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 Archives:
Bug reports: FAQ:
Beginner's list: