Making merge join iterable more reusable