For Exclusive Or, or xor, JavaScript uses bitwise ^ operator, which doesn't handle general case.
In Elm, use /= on two Booleans, that is False /= False, which is false, or True /= False, which it True.
Thus, for two booleans b1 xor b2 is same as b1 /= b2.
As Elm only supports True and False as all the truthy and falsey values, /= is truly equivalent to xor in ALL cases.
|