I have a C# method that looks a bit like this:
bool Eval() {
// do some work
if (conditionA) {
// do some work
if (conditionB) {
// do s
You could make your code into a kind of truth table, which depending on your real-world case might make it more explicit:
let condA() = true
let condB() = false
let condC() = true
let doThingA() = Console.WriteLine("Did work A")
let doThingB() = Console.WriteLine("Did work B")
let doThingC() = Console.WriteLine("Did work C")
let Eval() : bool =
match condA(), condB(), condC() with
| true, false, _ -> doThingA(); false;
| true, true, false -> doThingA(); doThingB(); false;
| true, true, true -> doThingA(); doThingB(); doThingC(); true;
| false, _, _ -> false;