vault backup: 2023-10-13 14:48:36
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user