# _MapNode\[K: [Any](builtin-Any) #share, V: [Any](builtin-Any) #share, H: [HashFunction](collections-HashFunction)\[K\] val\]
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L12)</span>
```pony
class val _MapNode[K: Any #share, V: Any #share, H: HashFunction[K] val]
```

## Constructors

### empty
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L18)</span>


```pony
new val empty(
  l: U8 val)
: _MapNode[K, V, H] val^
```
#### Parameters

*   l: [U8](builtin-U8) val

#### Returns

* [_MapNode](collections-persistent-_MapNode)\[K, V, H\] val^

---

### create
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L30)</span>


```pony
new val create(
  es: Array[(_MapNode[K, V, H] val | Array[(K , V)] val | (K , V))] iso,
  nm: U32 val,
  dm: U32 val,
  l: U8 val)
: _MapNode[K, V, H] val^
```
#### Parameters

*   es: [Array](builtin-Array)\[([_MapNode](collections-persistent-_MapNode)\[K, V, H\] val | [Array](builtin-Array)\[(K , V)\] val | (K , V))\] iso
*   nm: [U32](builtin-U32) val
*   dm: [U32](builtin-U32) val
*   l: [U8](builtin-U8) val

#### Returns

* [_MapNode](collections-persistent-_MapNode)\[K, V, H\] val^

---

## Public Functions

### apply
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L36)</span>


```pony
fun val apply(
  hash: USize val,
  key: K)
: V ?
```
#### Parameters

*   hash: [USize](builtin-USize) val
*   key: K

#### Returns

* V ?

---

### update
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L50)</span>


```pony
fun val update(
  hash: USize val,
  leaf: (K , V))
: (_MapNode[K, V, H] val , Bool val) ?
```
#### Parameters

*   hash: [USize](builtin-USize) val
*   leaf: (K , V)

#### Returns

* ([_MapNode](collections-persistent-_MapNode)\[K, V, H\] val , [Bool](builtin-Bool) val) ?

---

### remove
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L122)</span>


```pony
fun val remove(
  hash: USize val,
  key: K)
: _MapNode[K, V, H] val ?
```
#### Parameters

*   hash: [USize](builtin-USize) val
*   key: K

#### Returns

* [_MapNode](collections-persistent-_MapNode)\[K, V, H\] val ?

---

### entries
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L168)</span>


```pony
fun box entries()
: Array[(_MapNode[K, V, H] val | Array[(K , V)] val | (K , V))] val
```

#### Returns

* [Array](builtin-Array)\[([_MapNode](collections-persistent-_MapNode)\[K, V, H\] val | [Array](builtin-Array)\[(K , V)\] val | (K , V))\] val

---

## Private Functions

### _compressed_index
<span class="source-link">[[Source]](src/collections-persistent/_map_node.md#L161)</span>


```pony
fun box _compressed_index(
  nm: U32 val,
  dm: U32 val,
  idx: U32 val)
: U32 val
```
#### Parameters

*   nm: [U32](builtin-U32) val
*   dm: [U32](builtin-U32) val
*   idx: [U32](builtin-U32) val

#### Returns

* [U32](builtin-U32) val

---

