jcornaz / kwik

Property-based testing library for Kotlin
https://kwik.readthedocs.io
Other
21 stars 10 forks source link

Distinct operator #53

Open jcornaz opened 5 years ago

jcornaz commented 5 years ago

Here is how the API could look like:

/**
 * Returns a generator that emits items of the upstream generator only once (based on result of `hashCode` and `equals` method)
 *
 * Be sure to not overuse it has it may slow down your tests
 */
fun <T> Generator<T>.distinct(): Generator<T> = TODO()
ProdigSun commented 3 years ago

I'm going to try to tackle this issue :)