aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/util.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-01-30 13:46:59 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-01-30 13:46:59 +0000
commit222b8b52058da65a1dd276d191f6d54748a1485f (patch)
treefe3762a20909a7291b7cff2e222b90605785a546 /lib/util.ml
parenta02743ac6b64f87a497baba206082f6adbcb3219 (diff)
ajout list_split3, pr_semicolon et pr_bar
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2444 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
-rw-r--r--lib/util.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index 0f5b3dbf5..1bb69bf32 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -254,6 +254,11 @@ let list_splitby p =
in
splitby_loop []
+let rec list_split3 = function
+ | [] -> ([], [], [])
+ | (x,y,z)::l ->
+ let (rx, ry, rz) = list_split3 l in (x::rx, y::ry, z::rz)
+
let list_firstn n l =
let rec aux acc = function
| (0, l) -> List.rev acc
@@ -510,6 +515,8 @@ let pr_fnl = fnl
let pr_int = int
let pr_str = str
let pr_coma () = str "," ++ spc ()
+let pr_semicolon () = str ";" ++ spc ()
+let pr_bar () = str "|" ++ spc ()
let rec prlist elem l = match l with
| [] -> mt ()