

A boolean value interview question - sonic0002
http://pixelstech.net/article/index.php?id=1335793772

======
RodgerTheGreat
The solutions

    
    
       return  a ^  b ? c : a
       return  a == b ? a : c
    

Are expressing exactly the same idea- When A and B are identical, they will
xor to 0, and otherwise something nonzero. Thus, xor can be thought of in
general as a "!=" operator, provided booleans work like you'd expect in C.

~~~
sonic0002
Thank you for your remind. We have corrected the error. Yes, you are right,
these two solutions have the same logic.

------
ajuc

        (defn at_least_2 [a b c]
              (>= (count (filter true? [a b c])) 2))

