# rotateLeftMutation

> **rotateLeftMutation**<`T`>(`values`, `first`, `second`): readonly `T`\[]

Defined in: [packages/evolution/src/permutation.ts:77](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/evolution/src/permutation.ts#L77)

Rotate an inclusive ascending segment one position left in a new array. Equal indices are a fresh-array no-op. Runs in O(n) time and space and never mutates the input.

## Type Parameters

### T

`T`

## Parameters

### values

readonly `T`\[]

### first

`number`

### second

`number`

## Returns

readonly `T`\[]

## Throws

With code `INVALID_PERMUTATION` when `values` is not an array or `INVALID_INDEX` when an index is outside it or `first` exceeds `second`.
