vault backup: 2023-09-11 16:46:12
This commit is contained in:
parent
d2686afddb
commit
1b2f56f348
@ -149,3 +149,16 @@ val avg : int -> int -> int = <fun>
|
||||
```
|
||||
> 💭 We read that like "let avg the function that to a associate the function that to b associate a+b divided by two"
|
||||
|
||||
**For the match function**
|
||||
```Ocaml
|
||||
# let f x = watch x with
|
||||
| 0 -> 18
|
||||
| 1 -> 24
|
||||
| _ -> x*x ;;
|
||||
# let f = function
|
||||
| 0 -> 18
|
||||
| 1 -> 24
|
||||
| _ -> x * x;;
|
||||
```
|
||||
|
||||
### Filtering several values
|
||||
|
Loading…
x
Reference in New Issue
Block a user