[Haskell-cafe] Shouldnt this be lazy too?

Henning Thielemann lemming at henning-thielemann.de
Mon Sep 24 12:51:38 EDT 2007


On Mon, 24 Sep 2007, Vimal wrote:

> Hi all,
>
> I was surprised to find out that the following piece of code:
>
>> length [1..] > 10
>
> isnt lazily evaluated!

http://www.haskell.org/haskellwiki/Things_to_avoid#Don.27t_ask_for_the_length_of_a_list_when_you_don.27t_need_it


More information about the Haskell-Cafe mailing list