A simple Haskell library to verify whether or not a number is even or not. The complementary function isOdd
is also exported for your convenience.
stack install is-even
isEven 3
> False
isEven 4
> True
isOdd 0
> False
isOdd 1
> True
A glance at the source code will show that this is complete satire. Please don't ever use this library in production. Don't be like the npm folks.
If you have any ideas for even more convoluted implementations, please feel free to submit a pull request. I had a lot of fun working on this.
Naomi Liu https://github.com/dreamsmasher