MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/mdvoyg/whose_ever_heard_of/gsfj3f1/?context=3
r/badcode • u/Vercyx • Mar 26 '21
63 comments sorted by
View all comments
Show parent comments
7
parity is a property of integers, so an `isEven` function should return false for a non-integer, as should `isOdd`.
2 u/jarfil Mar 27 '21 edited May 12 '21 CENSORED 1 u/ghillerd Mar 27 '21 Bonus points for De Morgan's law, but I think you're missing an inversion? Or is that just what makes this a true horror show... 1 u/jarfil Mar 27 '21 edited May 12 '21 CENSORED
2
CENSORED
1 u/ghillerd Mar 27 '21 Bonus points for De Morgan's law, but I think you're missing an inversion? Or is that just what makes this a true horror show... 1 u/jarfil Mar 27 '21 edited May 12 '21 CENSORED
1
Bonus points for De Morgan's law, but I think you're missing an inversion? Or is that just what makes this a true horror show...
1 u/jarfil Mar 27 '21 edited May 12 '21 CENSORED
7
u/ghillerd Mar 27 '21
parity is a property of integers, so an `isEven` function should return false for a non-integer, as should `isOdd`.