summaryrefslogtreecommitdiff
path: root/H34.hs
diff options
context:
space:
mode:
Diffstat (limited to 'H34.hs')
-rw-r--r--H34.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/H34.hs b/H34.hs
index 6db5e5d..6cbbdad 100644
--- a/H34.hs
+++ b/H34.hs
@@ -1,3 +1,4 @@
-- http://en.wikipedia.org/wiki/Euler%27s_totient_function
-totient :: Integral a => a -> Bool
+
+totient :: (Integral a) => a -> Int
totient x = length $ filter ((==1).(gcd x)) [1..x]