From 3eec84838808139470261893ce15846852384bcf Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Wed, 1 Apr 2015 10:49:49 +0800 Subject: +37 +38 --- H34.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'H34.hs') 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] -- cgit v1.2.3-70-g09d2