I am a total quickcheck noob. Is there a way to find out what predicate 
test "<function>" is, below?

Also, is there a way I can ask quickcheck to test lists of various built 
in types, not just Int?

***********

Falsifiable, after 4 tests:
<function>
[1]
*Recursion> testMyBreak
Falsifiable, after 1 tests:
<function>
[-1,1,2]
*Recursion>


testMyBreak    = quickCheck $ \p l -> myBreak p (l :: [Int]) == break p l
myBreak t xs =
    let f t next rest =
              if t next 
                then ([], snd rest)
                else (next : fst rest, snd rest)
      in foldr ( f t ) ([],[]) xs

---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to