// "bool-xor.hac"
//	$Id: bool-xor.hac,v 1.3 2007/02/08 02:11:26 fang Exp $
// boolean logical XOR

defproc bool_xor_2(chan?(bool) A, B; chan!(bool) O) {
bool a, b;
chp {
*[A?(a),B?(b); O!(a != b)]	// want to use ^
}
}

// pending meta-expression expansion support
template <pint N>
defproc bool_xor(chan?(bool) A[N]; chan!(bool) O) {
bool a[N];
chp {
*[{,i:N: A[i]?(a[i])}; O!((^:i:N: a[i]))]	// we made an exception here...
}
}

