1 2 3 4
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