Module

# Data.Vec

- Package
- purescript-sized-vectors
- Repository
- bodil/purescript-sized-vectors

### #Vec Source

### #replicate' Source

`replicate' :: forall s a. Nat s => a -> Vec s a`

### #toUnfoldable Source

`toUnfoldable :: forall f s a. Unfoldable f => Nat s => Vec s a -> f a`

Convert a vector into any `Unfoldable`

.

### #index Source

`index :: forall i s a. Nat i => Lt i s => Vec s a -> i -> a`

Get the element at a given index inside a vector. Index out of bounds errors are caught at compile time.

Example:

```
myVector = 1 +> 2 +> 3 +> 4 +> empty
value = index myVector d2
-- value == 3
value = index myVector d4
-- out of bounds so does not type check
```

- Modules
- Data.
Vec