From 9945cc949501b940411c18ae3748d637fc700d6b Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 2 Feb 2021 04:33:58 -0800 Subject: [PATCH] [sledge] Fix type of List.iter Reviewed By: jvillard Differential Revision: D25883723 fbshipit-source-id: 0cee85030 --- sledge/nonstdlib/list.ml | 1 + sledge/nonstdlib/list.mli | 1 + 2 files changed, 2 insertions(+) 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