~ — NOT / Without
Function. Hanzi: 非/无 (非/無). Ranks: 0 monadic, ∞ ∞ dyadic
~Y negates Booleans, pervasively.
~0 1 ⍝ $t $f
X~Y removes the major cells of X found among the major cells of Y, retaining order and repetitions. Uses tolerant matching.
1 2 1 3~2 4 ⍝ 1 1 3
"banana"~"an" ⍝ "b"
[1 2◇3 4◇1 2]~[1 2◇] ⍝ [3 4◇]
An atom on the right acts as a one-item vector.
"a b c"~' ' ⍝ "abc"
Inverse
~⁻Y is ~Y.
~⁻1 0 ⍝ $f $t
Errors
RANK:Yis a scalar, or the set operation would compare cells of different ranksLENGTH: the major cells ofXandYdiffer in shape