Skip to content

Commit

Permalink
Add BindReturn to Property CE
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonMN committed Sep 21, 2021
1 parent adec353 commit 15e5e6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Hedgehog/Property.fs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ module PropertyBuilder =
member __.Bind(m : Gen<'a>, k : 'a -> Property<'b>) : Property<'b> =
m |> Property.forAll k

member __.BindReturn(m : Gen<'a>, f: 'a -> 'b) =
m
|> Gen.map (fun a -> (Journal.empty, Success a))
|> Property.ofGen
|> Property.map f

member __.ReturnFrom(m : Property<'a>) : Property<'a> =
m

Expand Down

0 comments on commit 15e5e6c

Please sign in to comment.