The only idea I have is $\ominus$ (⊖). Another possibility is defining a wrapper type Complement, specialize on intersect, and allow writing A ∩ ¬B. Any others?
I thought \ was the standard notation for this, but setdiff([1 2; 3 4], [4,5]) and [1 2; 3 4] \ [4,5] already mean different things.
Currently ¬ doesn’t parse as infix. But ~ does, and has no two-argument methods. Not sure I’ve seen either used, but the set operation is pronounced “A not B” right?
Thanks for the suggestion. No program (browser or terminal) I’ve tried so far has been able to render it, unfortunately. It’s ₛ - LATIN SUBSCRIPT SMALL LETTER S (U+209B) for others who don’t have it rendering either.
That’s a subscript s, which also doesn’t seem to work anywhere for me. Superscript s works better for me, so you could do const \ˢ = setdiff except that this is a pain to type!