`map` forgets its shrinker
See original GitHub issueFor example:
Gen.string().shrinker != null
Gen.string().map { it }.shrinker() == null
This means we don’t get a free shrinker when combining Gens. Moreover, it is surprising behaviour for users since it violates the functor law for map.
If it cannot be implemented without breaking covariance, then I think shrinker() should be removed from the Gen interface, and Gen should go back to being covariant.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:24 (14 by maintainers)
Top Results From Across the Web
if you could SHRINK in Minecraft - YouTube
Your browser can't play this video. ... Shrink Parkour is an awesome minecraft parkour map where you can shrink in size to solve...
Read more >Minecraft: WE SHRINK!!! - CRACK THE LOO - Custom Map [1]
We are super tiny!!!Jen's Channel http://youtube.com/gamingwithjenEPIC SHIRTS! Shirts! https://represent.com/store/popularmmosDon't forget ...
Read more >Shrinking Sections of the Map? : r/inkarnate - Reddit
Is there a way I can take a section of the map and shrink it down? ... Forget expanding the map add more...
Read more >Mercator Misconceptions: Clever Map Shows the True Size of ...
The world map you know is totally wrong. Check out this clever graphic, which helps put into perspective the true size of countries....
Read more >Your Mental World Map Is Wrong. Here's the Right One.
For the last 500 years, a certain kind of world map has been used to teach children about our planet. But forget everything...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes that’s one solution I suppose.
If I want to write a custom generator for strings, then I can either lose shrinker support, wrap the type in a data class, or have an overloaded forAll that accepts a specific shrinker. Out of those, I don’t think there’s much to choose between the last two, in that they’re both not ideal, but I do think they’re probably both better than the current situation.
Closed as per #1135