Open
Description
These three functions are pure, which is really great. But I believe purity gets it the way in the following use case: add key-value pair if key is not present or throw error in a monad if key is already present.
Sharing traversal for both presence check and update will avoid redundant work.