Custom binary function branch merge