Created
February 26, 2018 16:53
-
-
Save honzabrecka/f831b90d001cc94f9edd13f8923b2911 to your computer and use it in GitHub Desktop.
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
data Presentation = Presentation | |
{ prev :: [Int] | |
, current :: Int | |
, next :: [Int] | |
} deriving (Show) | |
instance Arbitrary Presentation where | |
arbitrary = arbitraryPresentation | |
arbitraryPresentation :: Gen Presentation | |
arbitraryPresentation = do | |
c <- arbitrary | |
p <- arbitrary | |
n <- arbitrary | |
return (Presentation { prev = p, current = c, next = n }) | |
pres_prop :: Presentation -> Bool | |
pres_prop p = not ((current p) >= 10 && (length $ prev p) >= 4 && (length $ next p) >= 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment