I really like doing this, but sometimes, when looking at the code really quick, in those languages that use the ! operator, I've found myself doing functions like isNotEmpty() so that I don't overlook the ! by mistake.
Kotlin's standard library has methods like isNotBlank() and isNotEmpty() as part of the String class that showcase this.
Ramda has a function called complement that can help you build these functions.
import complement from 'ramda/src/complement'
const isEven = num => num % 2 === 0
const isNotEven = complement(isEven)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.