Gizra/elm-compat-019/1.0.0

NOTE: the latest version is 1.1.0

Random018

Elm 0.19 removed the bool function.

bool : Generator Bool

Create a generator that produces boolean values. The following example simulates a coin flip that may land heads or tails.

type Flip
    = Heads
    | Tails


coinFlip : Generator Flip
coinFlip =
    map
        (\b ->
            if b then
                Heads


            else
                Tails
        )
        bool