Created
July 25, 2018 15:34
-
-
Save susisu/1b8ca93b934925d0ecb672f7f567dd39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Iterator: sig | |
type 'a t | |
type 'a result = | |
| Done | |
| Continue of 'a | |
val next: 'a t -> 'a result | |
end | |
module type Iterable = sig | |
type t | |
type value | |
val iterator: t -> value Iterator.t | |
end | |
module Make (I: Iterable): sig | |
val iterate: I.t -> f:(I.value -> unit) -> unit | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment