DEV Community

Discussion on: Boolean flip helper for Elm

Collapse
 
michaeljones profile image
Michael Jones • Edited

This is a super understandable approach to take and good job for sharing it for other people that are trying to get used to Elm.

I think Elm has a built in function in the Basics module which is automatically available called not which does this flipping. It would be more consistent with other languages of it used "!" instead but operators in Elm are expected to be binary so they opted to used a function instead.

As it is a function you can include it more easily in pipelines that use "|>" and you can combine it with other functions using ">>".