Skip to content

Instantly share code, notes, and snippets.

@jacobstanley
Created November 17, 2016 01:28
Show Gist options
  • Save jacobstanley/ee5b139b50296e65abffb7365ca8bd31 to your computer and use it in GitHub Desktop.
Save jacobstanley/ee5b139b50296e65abffb7365ca8bd31 to your computer and use it in GitHub Desktop.
Property as a Monad
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