From 9edb2d97d405ef15ca19af9021e664ef72bab5a6 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 10 Aug 2003 18:50:40 +0000 Subject: Ajout option_fold_right git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4251 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 46ac2e5ceb..d6e160efd7 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -603,6 +603,10 @@ let option_fold_left2 f e a b = match (a,b) with | Some x, Some y -> f e x y | _ -> e +let option_fold_right f a e = match a with + | Some x -> f x e + | _ -> e + let option_compare f a b = match (a,b) with | None, None -> true | Some a', Some b' -> f a' b' -- cgit v1.2.3