Match expression
Présentation
match test-expression with
| pattern1 [ when condition ] -> result-expression1
| pattern2 [ when condition ] -> result-expression2
| ...Exhaustivité
let fn x =
match x with
| Some true -> "ok"
| Some false -> "ko"
| None -> ""
| _ -> "?" // ⚠️ Warning FS0026: Cette règle n'aura aucune correspondanceGuard
Guard et Pattern OR
Mot clé function
functionIntérêts
Limites
Fonction fold
foldUtilisation
Intérêt
Mis à jour