Created
November 17, 2016 01:28
-
-
Save jacobstanley/ee5b139b50296e65abffb7365ca8bd31 to your computer and use it in GitHub Desktop.
Property as a Monad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prop_foo :: Property () | |
prop_foo = do | |
x <- forAll $ elements ["a", "b", "c"] | |
y <- forAll $ chooseInt 0 10 | |
guard $ not (x == "a" && y == 5) -- works like (==>) from QuickCheck | |
.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment