Name every outcome
Use records and unions to describe the data a rule accepts and every result it can return.
type Decision =
| Approve of int
| Review of string
| Decline
let decide score =
match score with
| n when n > 80 -> Approve 5000
| n when n > 55 -> Review "manual"
| _ -> Decline