Performing operations from boolean algebra is also quite straightforward in Elm.
||- Boolean or - returns true if at least one input is
&&- Boolean and - returns true only if both options are
not- Boolean negation - returns the opposite value of the input.
xor- Boolean exclusive-or - returns True if exactly one input is
Some programming languages treat the number zero or
null as synonymous with
False. Elm doesn’t allow that, nor does it consider a non-zero value to be
True. For a condition to be true, it must evaluate exactly to the value
Look how helpful the error messages are. It’s one of many reasons why Elm is such a delightful language.