<div class='sourceset sourceset-common'>Common</div>

```kotlin
interface Builder<E>: MutableList<E>, PersistentCollection.Builder<E>
```

A generic builder of the persistent list. Builder exposes its modification operations through the `MutableList` interface.

Builders are reusable, that is [build](#build) method can be called multiple times with modifications between these calls.
However, modifications applied do not affect previously built persistent list instances.

Builder is backed by the same underlying data structure as the persistent list it was created from.
Thus, [builder](/jetpack-compose/androidx.compose.runtime/runtime/interfaces/PersistentList.Builder) and [build](#build) methods take constant time consisting of passing the backing storage to the
new builder and persistent list instances, respectively.

The builder tracks which nodes in the structure are shared with the persistent list,
and which are owned by it exclusively. It owns the nodes it copied during modification
operations and avoids copying them on subsequent modifications.

When [build](#build) is called the builder forgets about all owned nodes it had created.

## Functions

<h2 id="build">build</h2>

```kotlin
override fun build(): PersistentList<E>
```