]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/extlib/hExtlib.ml
New function list_iter_sep.
[helm.git] / helm / software / components / extlib / hExtlib.ml
index 5f2c7f78caab9eef51dc733ebe59d4addfee1194..b2092c5b35be4b91db19529f1449f818f7555868 100644 (file)
@@ -248,6 +248,15 @@ let list_concat ?(sep = []) =
   in
   aux []
   
+let list_iter_sep ~sep f =
+  let rec aux =
+    function
+    | [] -> ()
+    | [ last ] -> f last
+    | hd :: tl -> f hd; sep (); aux tl
+  in
+  aux
+  
 let rec list_findopt f l = 
   let rec aux k = function 
     | [] -> None