diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-09-15 00:39:54 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-09-15 00:39:54 +0000 |
commit | 92616b9f660eaa2640964ca1925b05d37af70c8c (patch) | |
tree | 52f433af85ee3bf8195b91f78ea60df75902f62d /lib/util.ml | |
parent | 8cc623262c625bda20e97c75f9ba083ae8e7760d (diff) |
Some documentation and cleaning of CList and Util interfaces.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15805 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
-rw-r--r-- | lib/util.ml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/util.ml b/lib/util.ml index 42ad11ee1..102541731 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -442,12 +442,9 @@ let interval n m = interval_n ([],m) -let map_succeed f = - let rec map_f = function - | [] -> [] - | h::t -> try (let x = f h in x :: map_f t) with Failure _ -> map_f t - in - map_f +let map_succeed f l = + let filter x = try Some (f x) with Failure _ -> None in + List.map_filter filter l (*s Memoization *) |