except

From The K Language Wiki
Revision as of 06:40, 9 July 2022 by Promovicz (talk | contribs) ("Better category ordering, add redirects to categories, fix pseudo-adverb categories")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Except
x^y

The except primitive computes set difference of its two arguments.

Except is non-atomic, and only considers the elements at depth 1 for computing difference:

 (1 2;3 4)^,1 2
,3 4

in oK(K6), when left argument x is a number, it becomes equivalent to (!x)^y.

 10^1 3 7
0 2 4 5 6 8 9