Add a function to the library that merges two objects.