title: How do I determine if *exactly* one boolean is true, without type conversion?
body: <p>Given an arbitrary list of booleans, what is the most elegant way of determining that <em>exactly</em> one of them is true?</p>
  
  <p>The most obvious hack is type conversion: converting them to <code>0</code> for <code>false</code> and <code>1</code> for <code>true</code> and then summing them, and returning <code>sum == 1</code>.</p>
  
  <p>I'd like to know if there is a way to do this <em>without</em> converting them to ints, <strong>actually using boolean logic</strong>.</p>
  
  <p><em>(This seems like it should be trivial, idk, long week)</em></p>
  
  <p><strong>Edit:</strong> In case it wasn't obvious, this is more of a code-golf / theoretical question. I'm not fussed about using type conversion / int addition in PROD code, I'm just interested if there is way of doing it without that.</p>
  
  <p><strong>Edit2:</strong> Sorry folks it's a long week and I'm not explaining myself well. Let me try this:</p>
  
  <p>In boolean logic, ANDing a collection of booleans is true if all of the booleans are true, ORing the collection is true if least one of them is true. Is there a logical construct that will be true if exactly one boolean is true? XOR is this for a collection of two booleans for example, but any more than that and it falls over.</p>