let rec list_assoc' x = function | (a, b) :: t when x = b -> a | _ :: t -> list_assoc' x t | [] -> raise Not_found