The modifyPath function is to modify what assocPath is to assoc. We use it when we want to modify a nested property which modify cannot do. As with modify, it cannot create new keys with new values. It can only modify the values of existing keys.
Consider we want to add the title "Mr" to customer.name in the following order object: