当守卫让你添加任意条件
type Person = {
Age : int
PassedDriversTest : bool }
let someone = { Age = 19; PassedDriversTest = true }
match someone.PassedDriversTest with
| true when someone.Age >= 16 -> printfn "congrats"
| true -> printfn "wait until you are 16"
| false -> printfn "you need to pass the test"