package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module Seq_s : Traced_sigs.Seq_s.S with type 'error trace := 'error Monad.trace

Signature

type ('a, 'e) node = ('a, 'e) Bare_structs.Seq_es.node =
  1. | Nil
  2. | Cons of 'a * ('a, 'e) 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 = ('a, 'e) Bare_structs.Seq_es.t
include Seqes.Sigs.SEQMON2ALL with type ('a, 'e) mon := ('a, 'e) result Lwt.t with type ('a, 'e) t := ('a, 'e) t
val iter : ('a -> unit) -> ('a, 'e) t -> (unit, 'e) result Lwt.t
val fold_left : ('a -> 'b -> 'a) -> 'a -> ('b, 'e) t -> ('a, 'e) result Lwt.t
val iteri : (int -> 'a -> unit) -> ('a, 'e) t -> (unit, 'e) result Lwt.t
val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> ('a, 'e) t -> ('b, 'e) result Lwt.t
val for_all : ('a -> bool) -> ('a, 'e) t -> (bool, 'e) result Lwt.t
val exists : ('a -> bool) -> ('a, 'e) t -> (bool, 'e) result Lwt.t
val find : ('a -> bool) -> ('a, 'e) t -> ('a option, 'e) result Lwt.t
val find_map : ('a -> 'b option) -> ('a, 'e) t -> ('b option, 'e) result Lwt.t
val iter2 : ('a -> 'b -> unit) -> ('a, 'e) t -> ('b, 'e) t -> (unit, 'e) result Lwt.t
val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> ('b, 'e) t -> ('c, 'e) t -> ('a, 'e) result Lwt.t
val for_all2 : ('a -> 'b -> bool) -> ('a, 'e) t -> ('b, 'e) t -> (bool, 'e) result Lwt.t
val exists2 : ('a -> 'b -> bool) -> ('a, 'e) t -> ('b, 'e) t -> (bool, 'e) 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 map : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val mapi : (int -> 'a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val filter : ('a -> bool) -> ('a, 'e) t -> ('a, 'e) t
val filter_map : ('a -> 'b option) -> ('a, 'e) t -> ('b, 'e) t
val scan : ('b -> 'a -> 'b) -> 'b -> ('a, 'e) t -> ('b, 'e) t
val take_while : ('a -> bool) -> ('a, 'e) t -> ('a, 'e) t
val drop_while : ('a -> bool) -> ('a, 'e) t -> ('a, 'e) t
val group : ('a -> 'a -> bool) -> ('a, 'e) t -> (('a, 'e) t, 'e) t
val map2 : ('a -> 'b -> 'c) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t
val map_product : ('a -> 'b -> 'c) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t
val partition_map : ('a -> ('b, 'c) Either.t) -> ('a, 'e) t -> ('b, 'e) t * ('c, 'e) t
val partition : ('a -> bool) -> ('a, 'e) t -> ('a, 'e) t * ('a, 'e) t
val is_empty : ('a, 'e) t -> (bool, 'e) result Lwt.t
val uncons : ('a, 'e) t -> (('a * ('a, 'e) t) option, 'e) result Lwt.t
val length : ('a, 'e) t -> (int, 'e) result Lwt.t
val equal : ('a -> 'b -> bool) -> ('a, 'e) t -> ('b, 'e) t -> (bool, 'e) result Lwt.t
val compare : ('a -> 'b -> int) -> ('a, 'e) t -> ('b, 'e) t -> (int, 'e) result Lwt.t
val empty : ('a, 'e) t
val return : 'a -> ('a, 'e) t
val cons : 'a -> ('a, 'e) t -> ('a, 'e) t
val repeat : 'a -> ('a, 'e) t
val cycle : ('a, 'e) t -> ('a, 'e) t
val memoize : ('a, 'e) t -> ('a, 'e) t
val once : ('a, 'e) t -> ('a, 'e) t
val transpose : (('a, 'e) t, 'e) t -> (('a, 'e) t, 'e) t
val append : ('a, 'e) t -> ('a, 'e) t -> ('a, 'e) t
val concat : (('a, 'e) t, 'e) t -> ('a, 'e) t
val flat_map : ('a -> ('b, 'e) t) -> ('a, 'e) t -> ('b, 'e) t
val concat_map : ('a -> ('b, 'e) t) -> ('a, 'e) t -> ('b, 'e) t
val zip : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
val interleave : ('a, 'e) t -> ('a, 'e) t -> ('a, 'e) t
val sorted_merge : ('a -> 'a -> int) -> ('a, 'e) t -> ('a, 'e) t -> ('a, 'e) t
val product : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
val unzip : ('a * 'b, 'e) t -> ('a, 'e) t * ('b, 'e) t
val split : ('a * 'b, 'e) t -> ('a, 'e) t * ('b, 'e) t
val of_dispenser : (unit -> ('a option, 'e) result Lwt.t) -> ('a, 'e) t
val to_dispenser : ('a, 'e) t -> unit -> ('a option, 'e) result Lwt.t
val ints : int -> (int, 'e) t
module E : Seqes.Sigs.SEQMON2TRANSFORMERS with type ('a, 'e) mon := ('a, 'e) result Lwt.t with type ('a, 'e) callermon := ('a, 'e) result with type ('a, 'e) t := ('a, 'e) t
module S : Seqes.Sigs.SEQMON2TRANSFORMERS with type ('a, 'e) mon := ('a, 'e) result Lwt.t with type ('a, 'e) callermon := 'a Lwt.t with type ('a, 'e) t := ('a, 'e) t
module ES : Seqes.Sigs.SEQMON2TRANSFORMERS 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, 'e) t
val cons_s : 'a Lwt.t -> ('a, 'e) t -> ('a, 'e) t
val cons_e : ('a, 'e) result -> ('a, 'e) t -> ('a, 'e) t
val cons_es : ('a, 'e) result Lwt.t -> ('a, 'e) t -> ('a, 'e) t
val return_e : ('a, 'e) result -> ('a, 'e) t
val return_s : 'a Lwt.t -> ('a, 'e) t
val return_es : ('a, 'e) result Lwt.t -> ('a, 'e) t
val interrupted : 'e -> ('a, 'e) t
val interrupted_s : 'e Lwt.t -> ('a, 'e) t
val map_error : ('e -> 'f) -> ('a, 'e) t -> ('a, 'f) t
val map_error_s : ('e -> 'f Lwt.t) -> ('a, 'e) t -> ('a, 'f) t
val take : when_negative_length:'err -> int -> ('a, 'e) t -> (('a, 'e) t, 'err) result
val drop : when_negative_length:'err -> int -> ('a, 'e) t -> (('a, 'e) t, 'err) result
val of_seq : 'a Seq.t -> ('a, 'e) t
val of_seq_s : 'a Lwt.t Seq.t -> ('a, 'e) t
val of_seqs : 'a Seq_s.t -> ('a, 'e) t
val of_seq_e : ('a, 'e) result Seq.t -> ('a, 'e) t
val of_seqe : ('a, 'e) Seq_e.t -> ('a, 'e) t
val of_seq_es : ('a, 'e) result Lwt.t Seq.t -> ('a, 'e) t
OCaml

Innovation. Community. Security.