[Haskell-cafe] Shouldnt this be lazy too?

Vimal j.vimal at gmail.com
Mon Sep 24 12:12:49 EDT 2007


Hi all,

I was surprised to find out that the following piece of code:

> length [1..] > 10

isnt lazily evaluated! I wouldnt expect this to be a bug, but
in this case, shouldnt the computation end when the length function
evaluation goes something like:

> 10 + length [11..]

?

-- 
-- Vimal


More information about the Haskell-Cafe mailing list