vault backup: 2023-09-11 23:41:53

This commit is contained in:
2023-09-11 23:41:53 +02:00
parent 206c76bd7c
commit 38f5bd8492
3 changed files with 34 additions and 5 deletions

View File

@ -133,6 +133,8 @@ val f : int -> int = <fun>
# let succ x = x +1;;
val succ: int -> int = <fun>
(* these two functions are equivalent *)
# let succ = function x -> x + 1;;
val succ: int -> int = <fun>
```
@ -151,7 +153,7 @@ val avg : int -> int -> int = <fun>
**For the match function**
```Ocaml
# let f x = watch x with
# let f x = match x with
| 0 -> 18
| 1 -> 24
| _ -> x*x ;;