Skip to content

Commit

Permalink
optimized and simplified GenLazy.bind
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonMN committed Sep 10, 2021
1 parent 68dd1bf commit 78fbbbc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/Hedgehog/GenLazy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ let constant a = a |> Lazy.constant |> Gen.constant

let map f = f |> Lazy.map |> Gen.map

let bind f gla = gla |> map f |> Gen.map LazyGen.sequence |> Gen.join |> Gen.map Lazy.join
let join glgla = glgla |> Gen.bind Lazy.value

let bind f gla = gla |> map f |> join
1 change: 0 additions & 1 deletion src/Hedgehog/Hedgehog.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ https://github.com/hedgehogqa/fsharp-hedgehog/blob/master/doc/index.md
<Compile Include="ListGen.fs" />
<Compile Include="Journal.fs" />
<Compile Include="Tuple.fs" />
<Compile Include="LazyGen.fs" />
<Compile Include="GenLazy.fs" />
<Compile Include="GenLazyTuple.fs" />
<Compile Include="Outcome.fs" />
Expand Down
10 changes: 0 additions & 10 deletions src/Hedgehog/LazyGen.fs

This file was deleted.

0 comments on commit 78fbbbc

Please sign in to comment.