Clean code for comparing functions