# virtual_map.get_or_default · Rell standard library · Chromia Docs (concept)

> pure function get_ or_ default<R>(key: K, default: R): R Get the value associated with the given key in this map. Parameters key — the key to look up defau

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/virtual_map/get_or_default/

FUNCTION

# virtual\_map.get\_or\_default

```signature
pure function get_or_default<R>(key: K, default: R): R
```

Get the value associated with the given key in this map.

**Parameters**

* **key** — the key to look up
* **default** — the default value (lazily evaluated) to return if the key is not found

**Returns**

the value associated with the given key in this map, or `default` if the key is not found

Since 0.11.0

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