package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 's) t = ('a, 's) Base.Sequence.Step.t =
  1. | Done
  2. | Skip of {
    1. state : 's;
    }
  3. | Yield of {
    1. value : 'a;
    2. state : 's;
    }
include Bin_prot.Binable.S2 with type ('a, 's) t := ('a, 's) t
val bin_size_t : ('a, 'b, ('a, 'b) t) Bin_prot.Size.sizer2
val bin_write_t : ('a, 'b, ('a, 'b) t) Bin_prot.Write.writer2
val bin_read_t : ('a, 'b, ('a, 'b) t) Bin_prot.Read.reader2
val __bin_read_t__ : ('a, 'b, int -> ('a, 'b) t) Bin_prot.Read.reader2
val bin_writer_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.writer
val bin_reader_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.reader
val bin_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.t
include module type of struct include Base.Sequence.Step end with type ('a, 's) t := ('a, 's) t

A Step describes the next step of the sequence construction. Done indicates the sequence is finished. Skip indicates the sequence continues with another state without producing the next element yet. Yield outputs an element and introduces a new state.

Modifying 's doesn't violate any internal invariants, but it may violate some undocumented expectations. For example, one might expect that producing an element from the same point in the sequence would always give the same value, but if the state can mutate, that is not so.

A Step describes the next step of the sequence construction. Done indicates the sequence is finished. Skip indicates the sequence continues with another state without producing the next element yet. Yield outputs an element and introduces a new state.

Modifying 's doesn't violate any internal invariants, but it may violate some undocumented expectations. For example, one might expect that producing an element from the same point in the sequence would always give the same value, but if the state can mutate, that is not so.

val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('s -> Sexplib0.Sexp.t) -> ('a, 's) t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.