let add_unique eq e acc = if List.exists (eq e) acc then acc else e::acc