[Haskell-cafe] Stupid newbie question

Jeremy Shaw jeremy.shaw at linspireinc.com
Sat Jan 6 00:00:33 EST 2007


At Fri, 05 Jan 2007 20:59:16 -0800,
Mike Gunter wrote:
> 
> 
> >
> > pps. I didn't explain why [1..1000000] works, but [1..] fails, because
> > I don't know :) It's a bit suprising to me...
> 
> With [1..1000000], the generated values have to be tested against
> 1000000 as you go.  So, they get evaluated.  In the [1..] case,
> they don't.

Ah, that makes a lot of sense. Thanks!

j.


More information about the Haskell-Cafe mailing list