Skip to main content

All Questions

7 votes
3 answers
1k views

Why don't "multi-infinite" list comprehensions work with lazy evaluation?

As a simple demonstration of the efficiency of Haskell style, I thoughtlessly ran the following: take 100 [(a, b, c) | a <- [1..], b <- [1..], c <- [1..], a^2 + b^2 == c^2] This should be a ...
TheEnvironmentalist's user avatar