vault backup: 2023-09-05 21:35:41

This commit is contained in:
Louis Gallet 2023-09-05 21:35:41 +02:00
parent 633eb688ba
commit 3b44f8c8fd
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -55,13 +55,13 @@ val name: type of evaluation
### Local definitions
```Ocaml
# let r = 1. in let pi = 3.14 in 2*pi*r;;
_ : float = 6.28
- : float = 6.28
# let x = 10 in y = 2*x in x+y;;
_ : float = 30
- : float = 30
# x;;
_ : int =2 (*see global definition section*)
- : int =2 (*see global definition section*)
# pi;;
error: unbound value pi
@ -72,7 +72,7 @@ when there is the keyword ``len``and ``in`` that create a local definition. A lo
### Multiple definitions
```Ocaml
# let r = 1. and pi : 3.14 in 2 *. pi *. r;; (*local version*)
_ : float = 6.28
- : float = 6.28
# let x = 1.2 and y = "Hello";;
val x: float = 1.2 (*our current env is x -> 3 ; y -> 1 ; x -> 1.2 *)