vault backup: 2023-10-09 14:52:04

This commit is contained in:
Louis Gallet 2023-10-09 14:52:04 +02:00
parent f7f5cc38dd
commit f1743bfc94
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -151,3 +151,16 @@ let rec delete x = function
## Exercise 3.3 ## Exercise 3.3
```Ocaml ```Ocaml
# let rec length l =
if l = [] then 0
else
let e::t = l in
1 +. length t;;
#let rec insert x i list =
if x < 0 then
invalid_arg "negative rank"
else if i > length list then
failwith "Out of bound"
else