Distinct: Difference between revisions

From The K Language Wiki
Content added Content deleted
No edit summary
(unsorted unique (k9))
Line 7: Line 7:
?"abracadabra" /k9
?"abracadabra" /k9
"abcdr"
"abcdr"

{x@&(x?x)=!#x} /k9 unsorted unique

Revision as of 06:53, 9 July 2021

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