Comment made by: reiddraper
Ok, let's translate that to using {{gen/bind}}. Just like with nested properties, {{bind}} allows you to create generators that depend on the value of another generator. For example, your {{gen-random-path}} depends on the previously generated {{matrix}} variable. So let's write a generator that returns both a {{matrix}} and a {{random-path}}.
`
(def matrix-and-path
"Return a two-tuple of [matrix random-path]"
(gen/bind (gen-matrix 6)
(fn [matrix]
(gen/tuple (gen/return matrix) (gen-random-path matrix)))))
(prop/for-all [[matrix random-path] matrix-and-path]
(<= (cost (tsp matrix)) (cost random-path))
`