Thursday, December 2, 2010

Equality

(x == x == x) evaluates to true when x is true.

Assuming x = true, (x == x == x) <=>
    ((x == x) == x) <=>
    ((true == true) == true) <=>
    (true == true) <=> true.
Assuming x = false, (x == x == x) <=>
    ((false == false) == false) <=>
    (true == false) <=> false.

No comments:

Post a Comment