3 ms·
At the online REPL, you have to write something like: let primes = sieve [2..] where sieve (p:xs) = p : sieve [x| x <- xs, x `mod` p /= 0] in primes Which
by tomjakubowski 12y ago
At the online REPL, you have to write something like:
let primes = sieve [2..] where sieve (p:xs) = p : sieve [x| x <- xs, x `mod` p /= 0] in primes
Which is rather annoying.
- yawaramin 12y agoNot only that, but you have to do something like let primes = ... in take 5 primes ... if you want the computation to complete without hanging the browser. It would be nice if the REPL supported multi-line expressions.