From 222f9323945f10eb6e7ee84331a7bf5a65c5cbff Mon Sep 17 00:00:00 2001 From: puech Date: Fri, 29 Jul 2011 14:27:58 +0000 Subject: Coq_omega: replaced generic = on constr by eq_constr Util: Added list_assoc_f git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14350 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/util.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/util.ml') diff --git a/lib/util.ml b/lib/util.ml index 6a69c58d20..94b1d37c25 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -824,6 +824,10 @@ let list_fold_map' f l e = let list_map_assoc f = List.map (fun (x,a) -> (x,f a)) +let rec list_assoc_f f a = function + | (x, e) :: xs -> if f a x then e else list_assoc_f f a xs + | [] -> raise Not_found + (* Specification: - =p= is set equality (double inclusion) - f such that \forall l acc, (f l acc) =p= append (f l []) acc -- cgit v1.2.3