diff --git a/sledge/nonstdlib/list.ml b/sledge/nonstdlib/list.ml index f2424ce3d..36b1812cf 100644 --- a/sledge/nonstdlib/list.ml +++ b/sledge/nonstdlib/list.ml @@ -16,6 +16,7 @@ let tl_exn = tl let tl = function [] -> None | _ :: tl -> Some tl let pop_exn = function x :: xs -> (x, xs) | [] -> raise Not_found let mem elt seq ~eq = mem ~eq elt seq +let iter xs ~f = iter ~f xs let exists xs ~f = exists ~f xs let for_all xs ~f = for_all ~f xs let find_exn xs ~f = find ~f xs diff --git a/sledge/nonstdlib/list.mli b/sledge/nonstdlib/list.mli index 28a235d40..8d2782aad 100644 --- a/sledge/nonstdlib/list.mli +++ b/sledge/nonstdlib/list.mli @@ -32,6 +32,7 @@ val tl : 'a t -> 'a t option val tl_exn : 'a t -> 'a t val pop_exn : 'a list -> 'a * 'a list val mem : 'a -> 'a t -> eq:('a -> 'a -> bool) -> bool +val iter : 'a t -> f:('a -> unit) -> unit val exists : 'a t -> f:('a -> bool) -> bool val for_all : 'a t -> f:('a -> bool) -> bool val find : 'a t -> f:('a -> bool) -> 'a option