mirror of
https://github.com/c-cube/iter.git
synced 2025-12-05 19:00:31 -05:00
renamed Sequence.sequence to Sequence.t
This commit is contained in:
parent
546a77ba8f
commit
e5039470e8
2 changed files with 14 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
26
sequence.mli
26
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue