Closed travis-leith closed 4 years ago
There is a update
method for the dict
objects. You may want to check it out.
Is it correct to say that my pseudo code above would be properly translated as the following?
dictMerged <- dict1
dictMerged$update(dict2)
dictMerged$update(dict3)
You could chain the operations together. d1$update(d2)$update(d3)
. However notice that d1
is modified in place.
Maybe something like
dict(dict1, dict2, dict3, ...)
Collisions can be handled by taking either the first or last value for the same key.