The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Brother Bill (16) [Avatar] Offline
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.