vault backup: 2023-10-13 14:48:36

This commit is contained in:
2023-10-13 14:48:36 +02:00
parent b1132c0f1f
commit e29bce3e13
2 changed files with 15 additions and 3 deletions

View File

@ -155,6 +155,18 @@ let rec delete x = function
if x == e then i
else
e::delete x i
(* Correction *)
let rec delete x = function
|[] -> []
|e::t -> if e = x then
t
else if x < e then
e::t
else
e::delete x t ;;
val delete: int -> 'a list -> list = <fun>
```
## Exercise 3.3