c := make(M, len(a)+len(b))
for k, v := range a {
c[k] = v
}
for k, v := range b {
c[k] = v
}
Map<K, V> c = new HashMap<>(a);
c.putAll(b);
type
TKey = TSomeType;
TData = TSomeOtherType;
TMap = specialize TFPGMap<TKey, TData>;
...
c := TMap.Create;
for idx := 0 to a.count-1 do
begin
c.Add(a.keys[idx],a.data[idx]);
end;
for idx := 0 to b.count-1 do
begin
c.AddOrSetData(b.keys[idx],b.data[idx]);
end;
let mut c = b.clone();
c.extend(a.iter());