
7 Nov
2013
7 Nov
'13
8:20 p.m.
Hello, I have implemented a function for QuickCheck: untilJust :: Gen a -> (a -> Maybe b) -> Gen b I based it on the code for suchThat[1] and suchThatMaybe[2]. I am wondering if I have potentially re-implemented an existing function in part or full. In other words, is there an easier way of achieving this function without pulling the generator apart as much as I have in this implementation: http://lpaste.net/95317 [1] suchThat :: Gen a -> (a -> Bool) -> Gen a http://hackage.haskell.org/package/QuickCheck-2.6/docs/src/Test-QuickCheck-G... [2] suchThatMaybe :: Gen a -> (a -> Bool) -> Gen (Maybe a) http://hackage.haskell.org/package/QuickCheck-2.6/docs/src/Test-QuickCheck-G... -- Tony Morris http://tmorris.net/