summaryrefslogtreecommitdiff
path: root/H41.hs
diff options
context:
space:
mode:
Diffstat (limited to 'H41.hs')
-rw-r--r--H41.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/H41.hs b/H41.hs
new file mode 100644
index 0000000..1e9148b
--- /dev/null
+++ b/H41.hs
@@ -0,0 +1,9 @@
+import H40
+
+goldbachList :: Integer -> Integer -> [(Integer,Integer)]
+
+goldbachList a b
+ | a `mod` 2 == 0 = map goldbach [a,(a+2)..b]
+ | otherwise = goldbachList (a+1) b
+
+goldbachList' a b = filter ((>50).fst) $ goldbachList a b