4 ms·
Nitpick: I think the trick(s) also depend on XOR being associative. Are there any more complex applications of this, especially if you generalize it to any ope
by DylanSp 4y ago
Nitpick: I think the trick(s) also depend on XOR being associative.
Are there any more complex applications of this, especially if you generalize it to any operator that obeys the necessary properties? I'm curious if there's any sort of interesting data structures you can build, probably building on commutative monoids where x `mappend` x == mempty for all x (the generalization of x^x == 0).