NoRedInk/elm-random-extra/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Random.Set

List of Random Set Generators

Generators

empty : Generator (Set comparable)

Generator that always returns the empty set

singleton : Generator comparable -> Generator (Set comparable)

Generator that creates a singleton set from a generator

set : Int -> Generator comparable -> Generator (Set comparable)

Generate a set of size at most given maxLength from a generator.

notInSet : Set comparable -> Generator comparable -> Generator comparable

A generator that creates values not present in a given set.

Combinators

select : Set comparable -> Generator (Maybe comparable)

Generate values from a set. Analogous to Random.Extra.select but with sets

selectWithDefault : comparable -> Set comparable -> Generator comparable

Generate values from a set or a default value. Analogous to Random.Extra.selectWithDefault but with sets