Skip to content
Snippets Groups Projects
Commit 82db9ea9 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[extlib] remove obsolete functions

parent 0c99b337
No related branches found
No related tags found
No related merge requests found
......@@ -100,22 +100,6 @@ let replace cmp x l =
| y::l -> if cmp x y then x::l else y :: aux l
in aux l
let rec fold_map f acc = function
| [] -> acc, []
| x::tl ->
let (acc,x) = f acc x in
let (acc,tl) = fold_map f acc tl in
(acc,x::tl)
let rec fold_map_opt f acc = function
| [] -> acc, []
| x::tl ->
match f acc x with
| acc, None -> fold_map_opt f acc tl
| acc, Some x ->
let (acc,tl) = fold_map_opt f acc tl in
(acc,x::tl)
let product_fold f acc e1 e2 =
List.fold_left
(fun acc e1 -> List.fold_left (fun acc e2 -> f acc e1 e2) acc e2)
......
......@@ -99,12 +99,6 @@ val replace: ('a -> 'a -> bool) -> 'a -> 'a list -> 'a list
@since Neon-20140301
*)
val fold_map: ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list
(** Combines [fold_left] and [map] *)
val fold_map_opt: ('a -> 'b -> 'a * 'c option) -> 'a -> 'b list -> 'a * 'c list
(** Combines [filter] [fold_left] and [map] *)
val product_fold: ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
(** [product f acc l1 l2] is similar to [fold_left f acc l12] with l12 the
list of all pairs of an elt of [l1] and an elt of [l2]
......
......@@ -826,7 +826,7 @@ module GraphDot = OCamlGraph.Graphviz.Dot(struct
let rec complete_graph (graph:Graph.t) =
Graph.fold (fun k l graph ->
let graph, l =
Extlib.fold_map (fun graph e ->
List.fold_left_map (fun graph e ->
let m = Graph.singleton (Edge.succ e) [] in
let e = match e.edge_trans with
| Assign (_, _,_,_)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment