Commit 75058a68 authored by Julien Lopez's avatar Julien Lopez

[TESTS][MINOR] Fix in mapf from stdlib/list

parent 0acf2a7b
......@@ -16,7 +16,7 @@ module ESet = OUnitDiff.SetMake (struct
if (v1,t1) == (v2,t2) then 0
else let c = Var.compare v1 v2 in if c <> 0 then c
else Types.compare (diff t1 a) (diff t2 a)
let pp_printer ppf (v,t) = Format.fprintf ppf "(%a = %a)" Var.print v Types.Print.pp_type t
let pp_printer ppf (v,t) = Format.fprintf ppf "(%a = %a)" Var.pp v Types.Print.pp_type t
let pp_print_sep = OUnitDiff.pp_comma_separator
end)
......
......@@ -38,7 +38,7 @@ let iteri (f : (Int -> 'a -> []))(l : [('a)*]) : [] =
let mapf (f : 'a -> 'b)(l : [('a)*]) : [('b)*] =
let aux (f : 'a -> 'b)(l : [('a)*])(acc : [('b)*]) : [('b)*] = match l with
| [] -> acc
| [el; rest] -> aux f rest (acc @ [el]) in
| [el; rest] -> aux f rest (acc @ [(f el)]) in
aux f l []
(* List scanning *)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment