Understanding Targeted Properties
Regular properties work by using generators to create random data for each iteration of a test, running some checks, and then seeing if it works for all inputs. Inputs for each iteration are mostly independent—the framework scales the size element of generation between each one—and if you want the data generated to be diverse and relevant, you have to use metrics to tweak the generator by hand.
By comparison, targeted properties operate with a different principle: each iteration of a property can be used to influence later iterations’ data generation. Even better, the property itself can give feedback to PropEr telling it whether things are headed in the right direction.
This is a bit abstract, so let’s make ...