```haskell data CourseData = CD { cd_dur :: Dur , cd_end :: Time } instance Arbitrary CourseData where arbitrary = let terminal = [(CD <$> arbitrary) <*> arbitrary] in sized $ (\ n -> case n <= 1 of True -> oneof terminal False -> oneof $ ([] <> terminal)) ```