exo
This commit is contained in:
16
algo/ocaml/list.ml
Normal file
16
algo/ocaml/list.ml
Normal 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;;
|
||||
|
||||
Reference in New Issue
Block a user