package octez-libs

  1. Overview
  2. Docs
type +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t

This is similar to S.t but the suspended node is a promise.

and 'a t = unit -> 'a node Lwt.t
include Seqes.Sigs.SEQMON1ALL with type 'a mon := 'a Lwt.t with type 'a t := 'a t
val iter : ('a -> unit) -> 'a t -> unit Lwt.t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a Lwt.t
val iteri : (int -> 'a -> unit) -> 'a t -> unit Lwt.t
val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b Lwt.t
val for_all : ('a -> bool) -> 'a t -> bool Lwt.t
val exists : ('a -> bool) -> 'a t -> bool Lwt.t
val find : ('a -> bool) -> 'a t -> 'a option Lwt.t
val find_map : ('a -> 'b option) -> 'a t -> 'b option Lwt.t
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit Lwt.t
val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a Lwt.t
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool Lwt.t
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool Lwt.t
val init : int -> (int -> 'a) -> 'a t
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t
val forever : (unit -> 'a) -> 'a t
val iterate : ('a -> 'a) -> 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
val take_while : ('a -> bool) -> 'a t -> 'a t
val drop_while : ('a -> bool) -> 'a t -> 'a t
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t
val is_empty : 'a t -> bool Lwt.t
val uncons : 'a t -> ('a * 'a t) option Lwt.t
val length : 'a t -> int Lwt.t
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool Lwt.t
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int Lwt.t
val empty : 'a t
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val repeat : 'a -> 'a t
val cycle : 'a t -> 'a t
val memoize : 'a t -> 'a t
val once : 'a t -> 'a t
val transpose : 'a t t -> 'a t t
val append : 'a t -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val concat_map : ('a -> 'b t) -> 'a t -> 'b t
val zip : 'a t -> 'b t -> ('a * 'b) t
val interleave : 'a t -> 'a t -> 'a t
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t
val product : 'a t -> 'b t -> ('a * 'b) t
val unzip : ('a * 'b) t -> 'a t * 'b t
val split : ('a * 'b) t -> 'a t * 'b t
val of_dispenser : (unit -> 'a option Lwt.t) -> 'a t
val to_dispenser : 'a t -> unit -> 'a option Lwt.t
val ints : int -> int t
module E : Seqes.Sigs.SEQMON2TRAVERSORS with type ('a, 'e) mon := ('a, 'e) result Lwt.t with type ('a, 'e) callermon := ('a, 'e) result with type ('a, 'e) t := 'a t
module S : Seqes.Sigs.SEQMON1TRANSFORMERS with type 'a mon := 'a Lwt.t with type 'a callermon := 'a Lwt.t with type 'a t := 'a t
module ES : Seqes.Sigs.SEQMON2TRAVERSORS with type ('a, 'e) mon := ('a, 'e) result Lwt.t with type ('a, 'e) callermon := ('a, 'e) result Lwt.t with type ('a, 'e) t := 'a t
val return_s : 'a Lwt.t -> 'a t

return_s p is a sequence with the value the promise p resolves to as its single element.

val cons_s : 'a Lwt.t -> 'a t -> 'a t

cons_s p s is the sequence containing the value the promise p resolves to, followed by s.

val iter_p : ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

Similar to iter but wraps the iteration in Lwt. The steps of the iteration are started concurrently: one iteration is started as soon as the node becomes resolved. The promise iter_p f s is resolved only once all the promises of the iteration are. At this point it is either fulfilled if all promises are, or rejected if at least one of them is.

val iteri_p : (int -> 'a -> unit Lwt.t) -> 'a t -> unit Lwt.t

Similar to iteri but wraps the iteration in Lwt. All the steps of the iteration are started concurrently. The promise iteri_p f s is resolved only once all the promises of the iteration are. At this point it is either fulfilled if all promises are, or rejected if at least one of them is.

val take : when_negative_length:'err -> int -> 'a t -> ('a t, 'err) result
val drop : when_negative_length:'err -> int -> 'a t -> ('a t, 'err) result
val of_seq : 'a Seq.t -> 'a t
val of_seq_s : 'a Lwt.t Seq.t -> 'a t
OCaml

Innovation. Community. Security.