From b47befab3696c40c710ee80f366fa376ec967b30 Mon Sep 17 00:00:00 2001 From: Joe Zhao <ztuowen@gmail.com> Date: Wed, 1 Apr 2015 17:41:53 +0800 Subject: +40 +41 --- H41.hs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 H41.hs (limited to 'H41.hs') 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 -- cgit v1.2.3-70-g09d2