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: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] List.rev
On Sat, 2004-05-01 at 14:38, wrote:
> On Fri, 1 May 2004, skaller wrote:
> > BTW: documentation that says a function is 'tail recursive'
> > is misguided. That's an implementation detail of no
> > possible use to a user of the function. The user may
> > benefit from knowing the complexity of the function
> > in terms of speed and auxilliary storage required.
> You couldn't be more wrong.

Due respect but I am quite correct and provably so.

Tail-rec is a property of an actual function implementation.

The term has no meaning without exhibiting implementation
code, and it is usual for libraries to quite pointedly
NOT do that: instead the behaviour is specified in
terms of input and output of the function, and also
side effects in terms of time and storage requirements
are sometimes thrown in for more detail.

Saying tail-rec is suggestive only if you have
an implementation in your minds-eye.

It is good the documentation says the function
is tail-rec, this is better than no performance


John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: