[Haskell-beginners] list doesn't end

Alexander Chen alexander at chenjia.nl
Sat Nov 23 18:38:03 UTC 2019


Hi,

I am doing some further learning with euler now in Haskell instead of Julia. But I am getting something strange.

[x+y+z | x <- a2, y <- b3,  z <- c4, (x+y+z) < 50]

a2, b3, c4 are all finite lists derived from the lazy list of the primes package. the output is:

[28,47,33,49

this is not a typo it is still calculating hence the missing bracket (for the last couple of hours, when to a christmas fair in between). The only thing is that, this should be the answer:

[28,47,33,49] 

so it should be done but its not. what am I doing wrong?

best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20191123/77520139/attachment.html>


More information about the Beginners mailing list