Calculates the addition of two functions.