Function
Explanation
The Joke
A woman is breaking up with a bald, bearded man named Ted, telling him: "I'm sorry Ted, we can't be together. I can't stand your slightly sexist mathematical function jokes." Ted's response, muttered under his breath, is "SON(A BITCH)" -- formatted as if "son of a bitch" were a mathematical function, with "A BITCH" as the argument passed to the function "SON."
The joke operates on two levels simultaneously. First, it is a math pun: in mathematical notation, f(x) denotes applying a function f to an argument x, so "SON(A BITCH)" looks like applying the function "SON" to the input "A BITCH." Second, it proves the woman's point in real time -- she just said she is leaving him because of his sexist mathematical function jokes, and his immediate reaction is to make exactly that kind of joke, calling her a gendered slur in function notation.
The Humor
The comic is a tightly constructed self-demonstrating joke. The humor comes from the fact that Ted cannot help himself -- even in the moment of being dumped for this exact behavior, he instinctively responds with another sexist math-function joke, proving the woman entirely right. It is the same comedic structure as someone being told they are too argumentative and immediately responding "No I'm not!" The mathematical formatting of the insult is clever enough that you have to parse it for a moment, which adds to the satisfaction of getting the joke. The word "slightly" in the woman's complaint is also a nice touch -- she is being generous in her characterization, while Ted's response suggests the problem is anything but slight.
References
In mathematics, function notation such as f(x) is used to express the output of a function f when given input x. For example, sin(x) is the sine function applied to x. Here, "SON(A BITCH)" parodies this notation. The phrase "son of a bitch" is a common English-language expletive.