Skip to content

Instantly share code, notes, and snippets.

@honzabrecka
Created February 26, 2018 16:53
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 honzabrecka/f831b90d001cc94f9edd13f8923b2911 to your computer and use it in GitHub Desktop.
Save honzabrecka/f831b90d001cc94f9edd13f8923b2911 to your computer and use it in GitHub Desktop.
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