elm-community / random-extra / Random.Dict

Extra randomized functions on dicts.

Generators

dict : Basics.Int -> Random.Generator comparable -> Random.Generator value -> Random.Generator (Dict comparable value)

Generate a random dict with given length, key generator, and value generator

randomLength10StringIntDict =
    dict 10 (englishWord 10) (int 0 100)

rangeLengthDict : Basics.Int -> Basics.Int -> Random.Generator comparable -> Random.Generator value -> Random.Generator (Dict comparable value)

Generate a random dict of random length given a minimum length and a maximum length.