structure StableMerge Identical to Merge, except the functions are guaranteed to be stable: the relative order of equal elements is preserved.