let stable_dedoublonne list = let result = List.fold_left (fun accu elt -> if List.mem elt accu then accu else elt :: accu) [] list in List.rev result