# select

`import { select } from "destack:math";`

Per-lane conditional select.

Returns a[i] if mask[i] is true, otherwise b[i], for each lane.

```ds title="select"
export declare function select<T, const N: usize>(mask: Vector<boolean, N>, a: Vector<T, N>, b: Vector<T, N>): Vector<T, N>
```

[language/library/src/math/vector.ds:51:55](https://github.com/destack-sh/destack/blob/main/language/library/src/math/vector.ds#L51-L55)
