| So today I had two tables and needed to get a third table which was a combination of the two and was thinking about what to call a function to do that... "combine-tables"... "add-tables"... "+"? Interestingly that would make + work the same way for tables as it does for association lists: arc> (+ '((a 1) (b 2)) '((c 3)))
((a 1) (b 2) (c 3))
arc> (+ (obj a 1 b 2) (obj c 3))
#hash((a . 1) (b . 2) (c . 3))
If (+ g h) added the key/value pairs to the new returned table in reverse order, h before g, then keys in g would override keys in h and the correspondence would be perfect :) |