Use assert_smaller instead of assert_total
This commit is contained in:
parent
42d216fb98
commit
0dbd3e6bc8
|
@ -18,7 +18,7 @@ interface (Eq a, Integral a) => IntegralGCD a where
|
||||||
gcd x y =
|
gcd x y =
|
||||||
if x == 0 then y
|
if x == 0 then y
|
||||||
else if y == 0 then x
|
else if y == 0 then x
|
||||||
else assert_total $ gcd y (x `mod` y)
|
else gcd y (assert_smaller y $ x `mod` y)
|
||||||
|
|
||||||
|
|
||||||
export IntegralGCD Integer where
|
export IntegralGCD Integer where
|
||||||
|
|
Loading…
Reference in a new issue