]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/extlib/hExtlib.ml
more push/pop to avoid confusion with imperative data structures employed by
[helm.git] / helm / software / components / extlib / hExtlib.ml
index c16b11159c38ccde56621da9d3b9c97c611419c9..6af86f9cd4d4ac0b620d004976ea6a83fc951a6e 100644 (file)
@@ -520,3 +520,19 @@ let rec mk_list x = function
   | 0 -> []
   | n -> x :: mk_list x (n-1)
 ;;
+
+let list_seq start stop =
+  let rec aux pos =
+    if pos = stop then []
+    else pos :: (aux (pos+1))
+  in
+    aux start
+;;
+
+let rec list_skip n l =
+  match n,l with
+  | 0,_ -> l
+  | n,_::l -> list_skip (n-1) l
+  | _, [] -> assert false
+;;
+