From d09ec147fa223dcf760eaa592bc0573e678ea412 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Wed, 1 Apr 2015 12:05:34 +0800 Subject: +39 +40 --- H35.hs | 1 + H39.hs | 3 +++ H40.hs | 9 +++++++++ 3 files changed, 13 insertions(+) create mode 100644 H39.hs create mode 100644 H40.hs diff --git a/H35.hs b/H35.hs index 1d96e4e..caa59c0 100644 --- a/H35.hs +++ b/H35.hs @@ -1,5 +1,6 @@ module H35 ( primeFactors +, primes ) where primeSift (x:xs) = (x:) $ primeSift $ filter ((/=0).(`mod` x)) xs diff --git a/H39.hs b/H39.hs new file mode 100644 index 0000000..08da249 --- /dev/null +++ b/H39.hs @@ -0,0 +1,3 @@ +import H35 + +primesR a b = dropWhile ( (Integer, Integer) +goldbach x = sepToSum x primes $ reverse $ takeWhile ( n = sepToSum n hhs ts + | h+t < n = sepToSum n hs tts + | otherwise = (h,t) -- cgit v1.2.3-70-g09d2