Or-pattern to learn from IRC

<.null.> `

let if_b_then_A_else_B b = function A _ -> b | B _ -> not b`
match _ with (A x | B x) as a when if_b_then_A_else_B b a -> ...`