Skip to content

Commit

Permalink
Merge pull request #21 from harlantwood/patch-1
Browse files Browse the repository at this point in the history
Fix syntax error in example
  • Loading branch information
Qqwy committed Feb 17, 2024
2 parents 6b2dcd9 + 5b3cbb9 commit 8c1a894
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -267,7 +267,7 @@ Always returns the given value. No shrinking.

Allows you to take the result of one generator and transform it into something else.

>> G.choose(32..128).map(&:chr).sample(1, size: 10, Random.new(42))
>> G.choose(32..128).map(&:chr).sample(1, size: 10, rng: Random.new(42))
=> ["S"]

#### Generator#bind
Expand All @@ -279,7 +279,7 @@ Allows you to create one or another generator conditionally on the output of ano

This is an advanced feature. Often, you can use a combination of `Generators.tuple` and `Generator#map` instead:

>> G.tuple(integer, integer).sample(1, size: 100, rng: Random.new(42)
>> G.tuple(G.integer, G.integer).sample(1, size: 100, rng: Random.new(42))
=> [[2, 79]]

#### Generators.one_of
Expand Down

0 comments on commit 8c1a894

Please sign in to comment.