let rec list_assoc_memq' x = function | (a, b) :: t when x == b -> true | _ :: t -> list_assoc_memq' x t | [] -> false