match (a, b) with | (1, 1) -> 1 | (1, 0) -> (fix b); 1 | _ -> 0
switch (!!a) & ((!!b) < 1) { case 3: return 1; case 1: fix_b(); return 1; default: return 0; }
If you rewrite 3 as “A & B”, this turns into feature flags, and is less crazy looking (not sure arithmetic is allowed in case statements though).
Better (regardless of language) is flow like this:
if (!b) fix_b(); return a && b;
switch (!!a) & ((!!b) < 1) { case 3: return 1; case 1: fix_b(); return 1; default: return 0; }
If you rewrite 3 as “A & B”, this turns into feature flags, and is less crazy looking (not sure arithmetic is allowed in case statements though).
Better (regardless of language) is flow like this:
if (!b) fix_b(); return a && b;