Skip to content

Commit

Permalink
makes createTree tests pass again while also simplifying
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonMN authored and moodmosaic committed Feb 11, 2021
1 parent dfe8671 commit 3ff1fba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Hedgehog/Shrink.fs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ module Shrink =


let inline createTree (destination : ^a) (x : ^a) =
let one = LanguagePrimitives.GenericOne
let rec binarySearchTree ((destination : ^a), (x : ^a)) =
let xs =
towards (destination + one) x
|> Seq.cons destination
towards destination x
|> Seq.pairwise
|> Seq.map binarySearchTree
Node (x, xs)
Expand Down

0 comments on commit 3ff1fba

Please sign in to comment.