diff options
| author | herbelin | 2008-10-27 11:38:47 +0000 |
|---|---|---|
| committer | herbelin | 2008-10-27 11:38:47 +0000 |
| commit | e60054fe4dbdc26ed545c7ca6fb8ab36b244f2f7 (patch) | |
| tree | 9afe210d0103863b920989845bd27b0049a97423 /lib/util.ml | |
| parent | 1c450e282d8e6ae37f687c545776939f2d975cf3 (diff) | |
- Fixed many "Theorem with" bugs.
- Fixed doc of assert as.
- Doc of apply in + update credits.
- Nettoyage partiel de Even.v en utilisant "Theorem with".
- Added check that name is not in use for "generalize as".
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11511 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
| -rw-r--r-- | lib/util.ml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index d1e24e3216..9428aa134d 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -871,6 +871,16 @@ let list_cartesians op init ll = let list_combinations l = list_cartesians (fun x l -> x::l) [] l +(* Keep only those products that do not return None *) + +let rec list_cartesian_filter op l1 l2 = + list_map_append (fun x -> list_map_filter (op x) l2) l1 + +(* Keep only those products that do not return None *) + +let rec list_cartesians_filter op init ll = + List.fold_right (list_cartesian_filter op) ll [init] + (* Drop the last element of a list *) let rec list_drop_last = function [] -> assert false | hd :: [] -> [] | hd :: tl -> hd :: list_drop_last tl |
