renamed Sequence.sequence to Sequence.t

This commit is contained in:
Simon Cruanes 2013-01-28 00:12:19 +01:00
parent 546a77ba8f
commit e5039470e8
2 changed files with 14 additions and 14 deletions

View file

@ -2,7 +2,7 @@
(** {2 Transient iterators, that abstract on a finite sequence of elements. *) (** {2 Transient iterators, that abstract on a finite sequence of elements. *)
(** Sequence abstract iterator type *) (** Sequence abstract iterator type *)
type 'a sequence = { type 'a t = {
seq_fun: ('a -> unit) -> unit; seq_fun: ('a -> unit) -> unit;
} }

View file

@ -1,47 +1,47 @@
(** {2 Transient iterators, that abstract on a finite sequence of elements. *) (** {2 Transient iterators, that abstract on a finite sequence of elements. *)
type 'a sequence type 'a t
(** Sequence abstract iterator type *) (** Sequence abstract iterator type *)
(** {2 Build a sequence} *) (** {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 *) (** Build a sequence from a iter function *)
(** {2 Use a sequence} *) (** {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 *) (** 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 *) (** 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 *) (** 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 *) (** 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 *) (** 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 *) (** 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 *) (** Drop the [n] first elements of the sequence *)
(** {2 Basic data structures converters} *) (** {2 Basic data structures converters} *)
module List : module List :
sig sig
val of_seq : 'a sequence -> 'a list val of_seq : 'a t -> 'a list
val to_seq : 'a list -> 'a sequence val to_seq : 'a list -> 'a t
end end
module Hashtbl : module Hashtbl :
sig sig
val of_seq : ('a * 'b) sequence -> ('a, 'b) Hashtbl.t val of_seq : ('a * 'b) t -> ('a, 'b) Hashtbl.t
val to_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) sequence val to_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) t
end end