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 751fd2e15b - Show all commits

View File

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