function xor(s) {
  var r = 0;
  for (var i=0;i<s.length;i++) r^=s[i];
  return r;
}
// xor all items in s and return the result (for parity checks)
xor all items in s and return the result (for parity checks)
xor all items in s and return the result ( for parity checks )
function xor(s) {
  var r = 0;
  for (var i=0;i<s.length;i++) r^=s[i];
  return r;
}
function xor ( s ) { var r = 0 ; for ( var i = 0 ; i < s . length ; i ++ ) r ^= s [ i ] ; return r ; }
xor all items in s and return the result (for parity checks)
xor all items in s and return the result ( for parity checks )