Bare_structs.Seq_es
include Bare_sigs.Seq_es.S
with type ('a, 'e) seq_e_t := ('a, 'e) Seq_e.t
and type 'a seq_s_t := 'a Seq_s.t
This is similar to Seq.S
.t
but the suspended node is a promised result.
Similarly to Seq_e
, sequences of this module can be interrupted by an error. In this case, traversal has fully applied to the successful prefix before the returned promise evaluates to Error _
.
and ('a, 'e) t = unit -> (('a, 'e) node, 'e) Stdlib.result Lwt.t
include Seqes.Sigs.SEQMON2ALL
with type ('a, 'e) mon := ('a, 'e) Stdlib.result Lwt.t
with type ('a, 'e) t := ('a, 'e) t
val iter : ('a -> unit) -> ('a, 'e) t -> (unit, 'e0) Stdlib.result Lwt.t
val fold_left :
('a -> 'b -> 'a) ->
'a ->
('b, 'e) t ->
('a0, 'e0) Stdlib.result Lwt.t
val iteri :
(int -> 'a -> unit) ->
('a, 'e) t ->
(unit, 'e0) Stdlib.result Lwt.t
val fold_lefti :
('b -> int -> 'a -> 'b) ->
'b ->
('a, 'e) t ->
('b0, 'e0) Stdlib.result Lwt.t
val for_all : ('a -> bool) -> ('a, 'e) t -> (bool, 'e0) Stdlib.result Lwt.t
val exists : ('a -> bool) -> ('a, 'e) t -> (bool, 'e0) Stdlib.result Lwt.t
val find : ('a -> bool) -> ('a, 'e) t -> ('a option, 'e0) Stdlib.result Lwt.t
val find_map :
('a -> 'b option) ->
('a, 'e) t ->
('b option, 'e0) Stdlib.result Lwt.t
val init : int -> (int -> 'a) -> ('a, 'e) t
val unfold : ('b -> ('a * 'b) option) -> 'b -> ('a, 'e) t
val forever : (unit -> 'a) -> ('a, 'e) t
val iterate : ('a -> 'a) -> 'a -> ('a, 'e) t
val is_empty : ('a, 'e) t -> (bool, 'e0) Stdlib.result Lwt.t
val length : ('a, 'e) t -> (int, 'e0) Stdlib.result Lwt.t
val empty : ('a, 'e) t
val return : 'a -> ('a, 'e) t
val repeat : 'a -> ('a, 'e) t
val of_dispenser : (unit -> ('a option, 'e) Stdlib.result Lwt.t) -> ('a, 'e0) t
val to_dispenser : ('a, 'e) t -> unit -> ('a option, 'e0) Stdlib.result Lwt.t
val ints : int -> (int, 'e) t
val return_e : ('a, 'e) Stdlib.result -> ('a, 'e) t
val return_s : 'a Lwt.t -> ('a, 'e) t
val return_es : ('a, 'e) Stdlib.result Lwt.t -> ('a, 'e) t
val interrupted : 'e -> ('a, 'e) t
val interrupted_s : 'e Lwt.t -> ('a, 'e) t
val of_seq : 'a Stdlib.Seq.t -> ('a, 'e) t
val of_seq_s : 'a Lwt.t Stdlib.Seq.t -> ('a, 'e) t
val of_seq_e : ('a, 'e) Stdlib.result Stdlib.Seq.t -> ('a, 'e) t
val of_seq_es : ('a, 'e) Stdlib.result Lwt.t Stdlib.Seq.t -> ('a, 'e) t