All Questions
1 question
0
votes
2
answers
128
views
About strictness in haskell
I've created the following Haskell prime function (within ghci):
let pi :: Int -> Int -> Int;
pi 1 _ = 2;
pi x y = if all (/=0) (map (rem y) [pi z 2| z <- [1..(x-1)]]) then y else pi x (y+1);...