# Boolean flip helper for Elm

> In Elm you need a helper to do a boolean flip as we don't have a special character to negate expressions like in PHP.

- URL: https://graffino.com/til/boolean-flip-helper-for-elm
- Author: Nick Ciolpan
- Channel: elm
- Published: 2020-05-06
- Updated: 2021-01-15

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

The Elm way to achieve this is: 

```
module Helpers.Bool exposing (flip)

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

```

And the use it as:

```
import Helpers.Bool

...

Helpers.Bool.flip True
```
