[Haskell-cafe] Flattening tail recursion?

Stefan Holdermans sholderm at students.cs.uu.nl
Fri Dec 10 16:22:56 EST 2004


Henning,

> Why is Prelude.length not defined this way (according to the Haskell98
> report)?

The Report itself answers your question (in Chapter 8):

  "It constitutes a _specification_ for the Prelude. Many of the 
definitions are written with clarity rather than efficiency in mind, 
and it is not required that the specification be implemented as shown 
here."

Regards,

Stefan



More information about the Haskell-Cafe mailing list