distinct

Unique items of a list

Syntax: distinct x, distinct[x]

Where x is a list returns the distinct (unique) items of x in the order of their first occurrence.

q)distinct 2 3 7 3 5 3
2 3 7 5

Returns the distinct rows of a table.

q)distinct flip `a`b`c!(1 2 1;2 3 2;"aba")
a b c
-----
1 2 a
2 3 b

It does not use comparison tolerance

q)\P 14
q)distinct 2 + 0f,10 xexp -13
2 2.0000000000001

.Q.fu (apply unique)
Basics: Precision, Search

Errors

error cause
rank x is an atom