Apparently there is no boolean version of the bitwise exclusive开发者_运维百科-or operator (^^^)
... what to do?
This is provided by the not-equal operator <>
.
let inline xor a b = (a || b) && not (a && b)
Apparently there is no boolean version of the bitwise exclusive开发者_运维百科-or operator (^^^)
... what to do?
This is provided by the not-equal operator <>
.
let inline xor a b = (a || b) && not (a && b)
精彩评论