<div class='type'>Function</div>


<a id='references'></a>


<h2 id="mutablevector-capacity">MutableVector</h2>

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


```kotlin
public inline fun <reified T> MutableVector(capacity: Int = 16): MutableVector<T>
```


Create a `MutableVector` with a given initial `capacity`.





<hr class="docs-overload-divider">


<h2 id="mutablevector-size">MutableVector</h2>

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


```kotlin
public inline fun <reified T> MutableVector(
    size: Int,
    noinline init: (Int) -> T,
): MutableVector<T>
```


Create a `MutableVector` with a given `size`, initializing each element using the `init`
function.

`init` is called for each element in the `MutableVector`, starting from the first one and should
return the value to be assigned to the element at its given index.