<div style='font-family:Arial; font-size:13px;'>Hi Francesco,<div><br></div><div>length a2 = 7072</div><div>length b3 = 7072</div><div>length c4 = 82</div><div><br></div><div>I suspect its the first two that get it into trouble. Is is 7072*7072*82 = 41014081088 permutations, 100*3 = 1000000.</div><div><br></div><div>So I am guessing that this is not the fix to the euler problem....</div><div><br></div><div><br></div><div><br></div><div>best.</div><div><br><div>November 23, 2019 8:05:32 PM CET Francesco Ariis <fa-ml@ariis.it> wrote:<blockquote type="cite" cite="<20191123190532.GA659@x60s.casa>"><pre style="font-size:13px;">Hello Alexander,<br><br>On Sat, Nov 23, 2019 at 07:38:03PM +0100, Alexander Chen wrote:<br>> Hi,<br>> <br>> I am doing some further learning with euler now in Haskell instead of Julia.<br>But I am getting something strange.<br>> <br>> [x+y+z | x <- a2, y <- b3,  z <- c4, (x+y+z) < 50]<br>> <br>> a2, b3, c4 are all finite lists derived from the lazy list of the primes<br>package. the output is:<br>> <br>> [28,47,33,49<br><br>    λ> :m Data.Numbers.Primes<br>    λ> let a = take 100 primes<br>    λ> length [x+y+x | x <- a, y <- a, z <- a, (x+y+z) < 50]<br>    942<br><br>I suspect one in [a2, b3, c4] is infinite (or very very long). Can you<br>paste the whole calculation?<br>-F<br>_______________________________________________<br>Beginners mailing list<br><a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br></pre></blockquote></div><br><br><div><div style="font-family:Arial; font-size:13px;"><br></div></div></div></div>