ifigueroap / racket-quickcheck

Quickcheck Clone implemented in Racket
Other
32 stars 16 forks source link

Add ability to sample from generators #43

Open dbp opened 1 year ago

dbp commented 1 year ago

For debugging, it's nice to be able to sample directly from a generator. You can obviously hack this together with state or IO and a property that stores or prints the values, but if, for example (as I am) you are in a #lang without state or printing, it's not obviously how to do this.

e.g., (sample 10 generator) would give you 10 examples from the generator.