xor method
Implementation
Option<T> xor(Option<T> optb) {
if (isSome && optb.isNone) {
return Some(_someValue);
} else if (isNone && optb.isSome) {
return Some(optb.unwrap());
} else {
return None<T>();
}
}
Option<T> xor(Option<T> optb) {
if (isSome && optb.isNone) {
return Some(_someValue);
} else if (isNone && optb.isSome) {
return Some(optb.unwrap());
} else {
return None<T>();
}
}