Define, evaluate, and compare functions.