Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active February 5, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/c493384ce654f7334613274f0730bc0c to your computer and use it in GitHub Desktop.
Save deque-blog/c493384ce654f7334613274f0730bc0c to your computer and use it in GitHub Desktop.
instance Arbitrary Int where
arbitrary = Gen $ \rand -> fst (next rand)
prop_gcd_overflow :: Int -> Int -> Bool
prop_gcd_overflow a b = a * b == gcd a b * lcm a b
rapidCheck prop_gcd_overflow
> Failure {seed = -881134321,
counterExample = ["171542757","1235104953"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment