def common_exclusive
import cli@0.2.0.0/cli.bend as Cliimport Base
4095def common_exclusive(groups: List<&2, String>,
4096 +left: List<&2, String>, +right: List<&2, String>) -> Bool:
4097 match groups:
4098 case Nil{}: False{}
4099 case +name <> tail:
4100 Bool.or(Bool.and(
4101 List.contains(~String, ~String.eq, left, name),
4102 List.contains(~String, ~String.eq, right, name)),
4103 common_exclusive(tail, left, right))