[Haskell-cafe] Laziness question

Tillmann Rendel rendel at Mathematik.Uni-Marburg.de
Sat Jul 31 14:30:20 EDT 2010


michael rice wrote:
> f x = length [head x]
> g x = length (tail x)
> 
> Wouldn't both functions need to evaluate x to the same level, *thunk* : 
> *thunk* to insure listhood?

There is no need to "insure listhood" at run time, since Haskell is 
statically typed.

   Tillmann


More information about the Haskell-Cafe mailing list