This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.

Random.Bool

List of Bool Generators

Generators

bool : Generator Bool

Random Bool generator

module Random.Bool where
{-| List of Bool Generators

# Generators
@docs bool

-}

import Random       exposing (Generator)
import Random.Extra exposing (frequency, constant)

{-| Random Bool generator
-}
bool : Generator Bool
bool =
  frequency
    [ (1, constant True)
    , (1, constant False)
    ] (constant True)