It appears that JavaScript objects aren't compatible with the ^ XOR operator. So is there any way to create an XOR doubly linked list?
I can do regular single/double linked lists fine. And I've searched on both SO and Google without success, so my guess is that it isn't possible. Or perhaps no one really cares about XOR lists...
var node = function(data, xor){
this.data = data;
this.xor = xor;
}
var myNode=new node('data', 0);
console.log(0 ^ myNode); // shows 0, should show myNode
console.log(null ^ myNode); // shows 0, too
console.log(5 ^ 0); // 5 as expected