diff --git a/dm4/lib/lib.ml b/dm4/lib/lib.ml index aff1634..7d412e6 100644 --- a/dm4/lib/lib.ml +++ b/dm4/lib/lib.ml @@ -1,10 +1,10 @@ let plusetfois a b = (a+b, a*b);; -let rec pp2_h n = match n with +let rec ppp2_h n = match n with | 0 -> 1 - | _ -> 2 * (pp2_h (n/2)) + | _ -> 2 * (ppp2_h (n/2)) -let pp2 n = if n == 0 then 0 else pp2_h (n-1) +let ppp2 n = if n == 0 then 0 else ppp2_h (n-1) let leeloo l = match l with | _::_::_::_::a::_ -> a @@ -43,4 +43,4 @@ let rec lexico la lb = match la, lb with let rec aplatir l = match l with | [] -> [] | []::ql -> aplatir ql - | (a::q)::ql -> a::(aplatir (q::ql)) \ No newline at end of file + | (a::q)::ql -> a::(aplatir (q::ql)) diff --git a/dm4/test/test_dm4.ml b/dm4/test/test_dm4.ml index 35c13ef..899648d 100644 --- a/dm4/test/test_dm4.ml +++ b/dm4/test/test_dm4.ml @@ -2,10 +2,10 @@ open Lib;; assert (plusetfois 5 6 = (11, 30));; -assert (pp2 10 = 16);; -assert (pp2 32 = 32);; -assert (pp2 1 = 1);; -assert (pp2 0 = 0);; +assert (ppp2 10 = 16);; +assert (ppp2 32 = 32);; +assert (ppp2 1 = 1);; +assert (ppp2 0 = 0);; assert (leeloo [2; 65; 2; 3; 7; 2] = 7);; @@ -32,4 +32,4 @@ assert (aplatir [[1; 2]; [3; 4]] = [1; 2; 3; 4]);; assert (aplatir [[]; [3; 4]] = [3; 4]);; assert (aplatir [] = []);; assert (aplatir [[]] = []);; -assert (aplatir [[]; []] = []);; \ No newline at end of file +assert (aplatir [[]; []] = []);;