This commit is contained in:
2025-10-10 16:31:53 +02:00
parent 7cf158570d
commit bae49d03ec
4 changed files with 38 additions and 0 deletions

16
algo/ocaml/list.ml Normal file
View File

@@ -0,0 +1,16 @@
let i arth n a r=
if n<= 0 then
invalid_arg "invalide arg"
else
let rec suite n a =
if n=0 then
[]
else
a::suite(n-1)(a+2)
in suite n a;;
let rec concat l l2 =
match l with
[]->l2
|e::l->e::concat l l2;;