vault backup: 2023-09-11 16:35:43

This commit is contained in:
2023-09-11 16:35:43 +02:00
parent f9b8d8cecb
commit d2fd32dffc
2 changed files with 18 additions and 5 deletions

View File

@ -128,4 +128,17 @@ val f : int -> int = <fun>
```
> `y when y<0` is an evaluation
### Filtering and anonymous functions
```Ocaml
# let succ x = x +1;;
val succ: int -> int = <fun>
# let succ = function x -> x + 1;;
val succ: int -> int = <fun>
```
```Ocaml
# let f x = expr (*is equal to *) let f = function x -> expr
```
> ⚠️ Learn by heart