Formalizes a couple patterns to deduce code duplication