vault backup: 2023-10-06 16:00:48
This commit is contained in:
@ -78,6 +78,14 @@ val nth 'a list -> int -> 'a = <fun>
|
||||
let max_tail = max_value tl in
|
||||
if hd > max_tail then hd else max_tail
|
||||
in mv list;;
|
||||
|
||||
(* Correction *)
|
||||
let maximum = function
|
||||
[] -> invalid_arg "Pas bô"
|
||||
| e::t ->
|
||||
(let rec max_rec m = function
|
||||
[]-> m
|
||||
|e::t -> max_rec (if e>m then e else m) t in max_rec e t);;
|
||||
```
|
||||
|
||||
## 1.6 - Bonus second
|
||||
|
Reference in New Issue
Block a user