Skip to content

Commit

Permalink
Intro playground (#54)
Browse files Browse the repository at this point in the history
* Added into playground content

* Tiny typo

* Cleanup

* Cleanup

* Typo

* Cleanup

Co-authored-by: Magalie Tatischeff <[email protected]>
  • Loading branch information
magaliet and Magalie Tatischeff authored May 17, 2022
1 parent 5dda87e commit b838a42
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ let generatedSequence = digitGenerator.sequence(randomSource: randomSource) ///


/*: ### What is a `RandomSource`?
A `RandomSouce` enables us to control the randomness of the generated data.
Using the following static methods we can conveniently create deterministic and nondeterministic `RandomSource`s:
A `RandomSource` enables us to control the randomness of the generated data.
Using the following static methods we can conveniently create deterministic and nondeterministic random sources:
* `predetermined(seed:)` allows us to provide deterministic results based on a default or custom seed,
* `replay(seed:)` allows us to use an existing seed in order to obtain reproducible results. This is useful when debugging unit tests after extracting the seed from a previous generator
* `random()` creates a nondeterministic RandomSource */
* `random()` creates a nondeterministic random source */

/// Under the hood Genything uses a linear congruential random number generator wich allows us to reproduce the same values for particular seed.

/// Under the hood Genything uses a linear congruential random number generator wich allows us to reproduce the same values for particular seed.

Expand Down

0 comments on commit b838a42

Please sign in to comment.