Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active February 5, 2017 14:27
Show Gist options
  • Save deque-blog/76702491867eb3f10c3868a74b36c6cd to your computer and use it in GitHub Desktop.
Save deque-blog/76702491867eb3f10c3868a74b36c6cd to your computer and use it in GitHub Desktop.
prop_distributive :: Integer -> Integer -> (Integer -> Integer) -> Bool
prop_distributive a b f = f (a + b) == f a + f b
rapidCheck prop_distributive
> Failure {seed = 7720540227186278723,
counterExample = ["1716301762","55093645","<function>"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment