Jeu de tests pour vérifier vos réponses¶
let range n = rev (fold_left (fun x y -> (hd x + 1)::x) [0] (list_of_vect (make_vect n 0)));;
let fibolistlist = map fibolist (range 20);;
(* Question 9. *)
map (nb_occ 0) fibolistlist = map fibo (range 20);;
(* Question 10. *)
let t = map (tronque 2) fibolistlist in map rev t = t;;
(* Question 11. *)
tronque 1 (map (remplace_multi [0,[0;1];1,[0]]) fibolistlist) = tl fibolistlist;;