# map.put_all_copy · Rell standard library · Chromia Docs (concept)

> function put_ all_ copy(map: map <-K, -V>): map <K, V> Returns a new map with the mappings of this map combined with the mappings of the given map. Where a

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/map/put_all_copy/

FUNCTION

# map.put\_all\_copy

```signature
function put_all_copy(map: map<-K, -V>): map<K, V>
```

Returns a new map with the mappings of this map combined with the mappings of the given map.

Where a value exists for a given key in both this and the other map, the returned map has the value
of the other map, as opposed to the value in this map (right-biased).

`a.put_all_copy(b)` is equivalent to `a + b`, where `a` and `b` are both maps.

Examples:

* `[1: 'a', 2: 'b', 3: 'c'].put_all_copy([1: 'Z', 4: 'd', 5: 'e'])` returns
  `[1: 'Z', 2: 'b', 3: 'c', 4: 'd', 5: 'e']`
* `[1: 'a', 2: 'b', 3: 'c'].put_all_copy([4: 'd', 5: 'e'])` returns
  `[1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e']`

**Parameters**

* **map** — the other map

Since 0.14.16

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/map/put_all_copy.html)Generated API reference, mirrored from the live docs
