Module providing extra functionality to the core Random module.
Turn a list of generators into a generator of lists.
Generator that randomly selects an element from a list.
Generator that randomly selects an element from a list with a default value (in case you pass in an empty list).
Create a generator that chooses a generator from a tuple of generators based on the provided likelihood. The likelihood of a given generator being chosen is its likelihood divided by the sum of all likelihood. A default generator must be provided in the case that the list is empty or that the sum of the likelihoods is 0. Note that the absolute values of the likelihoods is always taken.
Choose between two generators with a 50-50 chance. Useful for merging two generators that cover different areas of the same type.
Because map and mapN up through N=5 were added to the core Random
library in Elm 0.16, the versions below are aliases and are kept only
for compatibility with prior versions of this library.
Apply a constraint onto a generator and returns both the input to the constraint and the result of applying the constaint.
Reduce a generator using a reducer and an initial value. Note that the initial value is always passed to the function; not the previously generator value.
Alias for reduce.
Apply a generator of functions to a generator of values. Useful for chaining generators.
An alias for Random.andThen in the standard library. This
version is kept for compatibility.
Convert a generator into a generator that only generates values that satisfy a given predicate. Note that if the predicate is unsatisfiable, the generator will not terminate.
Convert a generator into a generator that only generates values that do not satisfy a given predicate.
Generate n values from a generator.
Quickly generate a value from a generator disregarding seeds.
Generate iteratively a list of values from a generator until either the given maxlength is reached or the predicate is satisfied.
cappedGenerateUntil maxLength predicate generator seedGenerate iteratively a list of values from a generator parametrized by the value of the iterator until either the given maxlength is reached or the predicate is satisfied.
generateIterativelyUntil maxLength predicate constructor seedGenerate iteratively a list of values from a generator parametrized by the value of the iterator until either the given maxlength is reached or the predicate ceases to be satisfied.
generateIterativelySuchThat maxLength predicate constructor seedGenerate a list of values from a generator until the given predicate is satisfied
Generate a value from a generator that satisfies a given predicate
Create a generator that always returns the same value.