diff options
| author | herbelin | 2003-08-10 18:50:40 +0000 |
|---|---|---|
| committer | herbelin | 2003-08-10 18:50:40 +0000 |
| commit | 9edb2d97d405ef15ca19af9021e664ef72bab5a6 (patch) | |
| tree | 4acf458f9eca9f2c34f5131206740dcead85ddb8 /lib/util.ml | |
| parent | 779502eaf0f875821bcf2d7cbf237833dd06e07d (diff) | |
Ajout option_fold_right
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4251 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
| -rw-r--r-- | lib/util.ml | 4 |
1 files changed, 4 insertions, 0 deletions
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' |
