Pattern guards for functions and switch statements #830

Merged
ghallak merged 23 commits from ghallak/232 into master 2021-10-20 17:04:01 +09:00
Showing only changes of commit c6acb94921 - Show all commits

View File

@ -485,7 +485,7 @@ function g(p : int * option(int)) : int =
``` ```
Guards are boolean expressions that can be used on patterns in both switch Guards are boolean expressions that can be used on patterns in both switch
statements and functions definitions. If a guard expression evalutaes to statements and functions definitions. If a guard expression evaluates to
`true`, then the corresponding body will be used. Otherwise, the next pattern `true`, then the corresponding body will be used. Otherwise, the next pattern
will be checked: will be checked: