main = print $ getPrime 10 getPrime x = [(y, z) | y <- [1..x], z <- [y .. x], isPrime $ y + z] isPrime x = all (\y-> x `mod` y /=0)$ filter isPrime [2 .. floor $ sqrt $ fromIntegral x]
Standard input is empty
[(1,1),(1,2),(1,4),(1,6),(1,10),(2,3),(2,5),(2,9),(3,4),(3,8),(3,10),(4,7),(4,9),(5,6),(5,8),(6,7),(7,10),(8,9),(9,10)]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!