I'm not sure what you mean here... you want to try factoring out the two symmetric cases into one function? I don't think that's worth it in this case.