An implementation of shrinking, for use in finding the simplest possible failure case in generative test failures. Based off of Haskell's QuickCheck, and Scala's ScalaCheck
Say you have found a test case that fails for the inputted value of 4. The shrink function will return a sequence of integers, [0 2 -2 3 -3], that you can try as inputs to that failing test case. The aim being to identify the smallest possible failure case, which you will then report to the user.