ž Unique


One-argument form  See also two-argument form Union

Unique is used to remove duplicated items from a vector. The result is a vector containing all the unique items in the argument, in the order in which they first appear. The argument must be a vector (or scalar).

When the argument is nested, an exact match in data and structure must be found before an item is removed as a duplicate. This operation is affected by ŒCT, the comparison tolerance.

       ž'THE QUALITY OF MERCY IS NOT STRAINED'
THE QUALIYOFMRCSND

      ž1 4 17 23 12 4 2 7 99 33 ¯1 4 17 99 100 101
1 4 17 23 12 2 7 99 33 ¯1 100 101

      ž'THIS' 'THAT' 'THE' 'OTHER' 'OTHER' 'THAN' 'THIS' 'AND' 'THAT'
 THIS THAT THE OTHER THAN AND

See also the other 'set' operations: ž Union, Intersection and ~ Without .


Topic: APLX Help : Help on APL language : APL Primitives : ž Unique
[ Previous | Next | Contents | Index ]