main(a,b,c) = (s, r) where s = (a xor b) xor c; r = (a and b) or ((a xor b) and c); end where