Small factorisation: merge push & inject and pop & eject on deques