[sledge] Remove unused filter_map_endo functions

Reviewed By: ngorogiannis

Differential Revision: D24306100

fbshipit-source-id: 324516924
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent 78a3dee2d9
commit a204c7f7be

@ -76,15 +76,3 @@ let map_endo map t ~f =
x' )
in
if !change then t' else t
let filter_map_endo filter_map t ~f =
let change = ref false in
let t' =
filter_map t ~f:(fun x ->
let x'_opt = f x in
( match x'_opt with
| Some x' when x' == x -> ()
| _ -> change := true ) ;
x'_opt )
in
if !change then t' else t

@ -47,7 +47,6 @@ let fold_option xs ~init ~f =
(fold xs ~init ~f:(fun acc elt ->
match f acc elt with Some res -> res | None -> return None ))
let filter_map_endo t ~f = filter_map_endo filter_map t ~f
let map_endo t ~f = map_endo map t ~f
let rev_map_unzip xs ~f =

@ -40,10 +40,6 @@ val map_endo : 'a t -> f:('a -> 'a) -> 'a t
(** Like map, but specialized to require [f] to be an endofunction, which
enables preserving [==] if [f] preserves [==] of every element. *)
val filter_map_endo : 'a t -> f:('a -> 'a option) -> 'a t
(** Like filter_map, but specialized to require [f] to be an endofunction,
which enables preserving [==] if [f] preserves [==] of every element. *)
val rev_map_unzip : 'a t -> f:('a -> 'b * 'c) -> 'b list * 'c list
(** [rev_map_unzip ~f xs] is [unzip (rev_map ~f xs)] but more efficient. *)

Loading…
Cancel
Save