added `negate` method for inverting the boolean value of a given function; useful for filter scenarios