Boolean flip helper for Elm

Nick Ciolpan - May 15 '20 - - Dev Community

There is no such thing as !True to get a False value in Elm.

Here's how I do it.

module Helpers.Bool exposing (flip)

flip: Bool -> Bool
flip bool = 
    if bool == True then
    False
  else
    True

And then:

import Helpers.Bool

...

Helpers.Bool.flip True

For more: Today I Learned

. . . . . . .
Terabox Video Player