summaryrefslogtreecommitdiff
path: root/libs/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'libs/util.ml')
-rw-r--r--libs/util.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/util.ml b/libs/util.ml
index 68332b6..b1fcdc4 100644
--- a/libs/util.ml
+++ b/libs/util.ml
@@ -9,3 +9,12 @@ let rec fix f s =
else fix f fs
let (@@) f x = f x
+
+let print_list x l =
+ Format.printf "%s: " x;
+ let rec aux = function
+ | [] -> ()
+ | [a] -> Format.printf "%s" a
+ | p::q -> Format.printf "%s, " p; aux q
+ in
+ Format.printf "["; aux l; Format.printf "]@.";