Skip to content

Commit

Permalink
Implement P33 as pointfree
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijit Sarkar committed Jan 5, 2024
1 parent b6fe568 commit 30b0e30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Arithmetic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Problem 33: (*) Determine whether two positive integer numbers are coprime.
Two numbers are coprime if their greatest common divisor equals 1.
-}
coprime :: Int -> Int -> Bool
coprime x y = myGCD x y == 1
coprime = ((1 ==) .) . myGCD

{-
Problem 34: (**) Calculate Euler's totient function phi(m).
Expand Down

0 comments on commit 30b0e30

Please sign in to comment.