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.
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.