distinct

From The K Language Wiki
Revision as of 06:53, 9 July 2021 by Ktye (talk | contribs) (unsorted unique (k9))
Distinct
?x

Distinct, a.k.a. unique or uniq, returns a copy of its argument without duplicate items (according to the definition of match). K9 additionally sorts the result.

 ?"abracadabra"
"abrcd"
 ?"abracadabra" /k9
"abcdr"
{x@&(x?x)=!#x}  /k9 unsorted unique