# setDistinct() Function & Examples

Use the setDistinct() set function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## setDistinct

#### setDistinct(set)

Try it yourself:

```calculio
setDistinct([1, 1, 1, 2, 2, 3])
```

---

## Keep unique values with setDistinct

**setDistinct** removes duplicate members from a collection according to set equality. It prepares lists for membership checks and set operations.

## Example

Applying it to [1,1,2,3,3] leaves 1, 2, and 3. Use [setSize](https://calcul.io/function/setSize/index.md) to count unique members and [setUnion](https://calcul.io/function/setUnion/index.md) to combine unique memberships from sources.

## Caveats

Distinctness depends on value equality; objects and floating-point values may require care. Use [deepEqual](https://calcul.io/function/deepEqual/index.md) to understand structural comparisons, and do not use distinctness when repeated frequency is essential—use [mode](https://calcul.io/function/mode/index.md) instead.

[All functions](https://calcul.io/functions/index.md)
