From e5039470e8903f73d1f9893bd2a4b13c5b0b5ffc Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 28 Jan 2013 00:12:19 +0100 Subject: [PATCH] renamed Sequence.sequence to Sequence.t --- sequence.ml | 2 +- sequence.mli | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sequence.ml b/sequence.ml index 0fbed29..8d5915b 100644 --- a/sequence.ml +++ b/sequence.ml @@ -2,7 +2,7 @@ (** {2 Transient iterators, that abstract on a finite sequence of elements. *) (** Sequence abstract iterator type *) -type 'a sequence = { +type 'a t = { seq_fun: ('a -> unit) -> unit; } diff --git a/sequence.mli b/sequence.mli index ecfeaba..05585e6 100644 --- a/sequence.mli +++ b/sequence.mli @@ -1,47 +1,47 @@ (** {2 Transient iterators, that abstract on a finite sequence of elements. *) -type 'a sequence +type 'a t (** Sequence abstract iterator type *) (** {2 Build a sequence} *) -val from_iter : (('a -> unit) -> unit) -> 'a sequence +val from_iter : (('a -> unit) -> unit) -> 'a t (** Build a sequence from a iter function *) (** {2 Use a sequence} *) -val iter : ('a -> unit) -> 'a sequence -> unit +val iter : ('a -> unit) -> 'a t -> unit (** Consume the sequence, passing all its arguments to the function *) -val fold : ('b -> 'a -> 'b) -> 'b -> 'a sequence -> 'b +val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b (** Fold over elements of the sequence, consuming it *) -val map : ('a -> 'b) -> 'a sequence -> 'b sequence +val map : ('a -> 'b) -> 'a t -> 'b t (** Map objects of the sequence into other elements, lazily *) -val filter : ('a -> bool) -> 'a sequence -> 'a sequence +val filter : ('a -> bool) -> 'a t -> 'a t (** Filter on elements of the sequence *) -val concat : 'a sequence -> 'a sequence -> 'a sequence +val concat : 'a t -> 'a t -> 'a t (** Concatenate two sequences *) -val take : int -> 'a sequence -> 'a sequence +val take : int -> 'a t -> 'a t (** Take at most [n] elements from the sequence *) -val drop : int -> 'a sequence -> 'a sequence +val drop : int -> 'a t -> 'a t (** Drop the [n] first elements of the sequence *) (** {2 Basic data structures converters} *) module List : sig - val of_seq : 'a sequence -> 'a list - val to_seq : 'a list -> 'a sequence + val of_seq : 'a t -> 'a list + val to_seq : 'a list -> 'a t end module Hashtbl : sig - val of_seq : ('a * 'b) sequence -> ('a, 'b) Hashtbl.t - val to_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) sequence + val of_seq : ('a * 'b) t -> ('a, 'b) Hashtbl.t + val to_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) t end