vault backup: 2023-10-26 21:02:35

This commit is contained in:
Louis Gallet 2023-10-26 21:02:35 +02:00
parent 6625228fb7
commit 6c88ecb86f
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -20,11 +20,11 @@ let pos_max lst =
if lst = [] then if lst = [] then
failwith "pos_max: empty list" failwith "pos_max: empty list"
else else
let rec pmr mval mpos cpos = function let rec pmr mpos cpos = function
| [] -> mpos | [] -> mpos
| e::t -> | e::mval::t ->
if e > mval then if e > mval then
pmr e cpos (cpos + 1) t pmr cpos (cpos + 1) t
else else
pmr mval mpos (cpos + 1) t pmr mval mpos (cpos + 1) t
in let init_max = in let init_max =