Commit e705f672 authored by POTTIER Francois's avatar POTTIER Francois

Removed [Misc.truncate], replaced with [General.take].

parent 464be7d3
......@@ -106,8 +106,8 @@ module StateVector = struct
let push v x =
x :: v
let truncate h v =
Misc.truncate h v
let truncate =
MenhirLib.General.take
end
......
......@@ -62,18 +62,6 @@ let tabulateo number fold n f =
in
get, !c
let rec truncate k xs =
match k, xs with
| 0, _ ->
[]
| _, [] ->
assert false
| _, x :: xs ->
x :: truncate (k-1) xs
let truncate k xs =
if List.length xs <= k then xs else truncate k xs
module IntSet = Set.Make (struct
type t = int
let compare = ( - )
......
......@@ -51,10 +51,6 @@ val tabulatef:
val tabulateo: ('a -> int) -> ((unit -> 'a -> unit) -> unit -> unit) -> int -> ('a -> 'b option) -> ('a -> 'b option) * int
(* Truncature of a list. *)
val truncate: int -> 'a list -> 'a list
(* Reverse function application. *)
val ( $$ ) : 'a -> ('a -> 'b) -> 'b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment