We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cf3a8 commit f5dbdf6Copy full SHA for f5dbdf6
src/Hedgehog/Shrink.fs
@@ -102,13 +102,13 @@ module Shrink =
102
let one = LanguagePrimitives.GenericOne
103
let rec binarySearchTree (destination : ^a) (x : ^a) =
104
let xs =
105
- towards destination x
106
- |> Seq.cons (destination - one)
+ towards (destination + one) x
+ |> Seq.cons destination
107
|> Seq.pairwise
108
- |> Seq.map (fun (d, x) -> binarySearchTree (d + one) x)
+ |> Seq.map (fun (d, x) -> binarySearchTree d x)
109
Node (x, xs)
110
if destination = x then
111
Node (x, Seq.empty)
112
else
113
- binarySearchTree (destination + one) x
+ binarySearchTree destination x
114
|> Tree.addChildValue destination
0 commit comments