Sequence.Stepinclude Bin_prot.Binable.S2 with type ('a, 's) t := ('a, 's) tval bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t -> Bin_prot.Shape.tval bin_size_t : ('a, 'b, ('a, 'b) t) Bin_prot.Size.sizer2val bin_write_t : ('a, 'b, ('a, 'b) t) Bin_prot.Write.writer2val bin_read_t : ('a, 'b, ('a, 'b) t) Bin_prot.Read.reader2val __bin_read_t__ : ('a, 'b, int -> ('a, 'b) t) Bin_prot.Read.reader2val bin_writer_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.writerval bin_reader_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.readerval bin_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.tinclude module type of struct include Base.Sequence.Step end with type ('a, 's) t := ('a, 's) tA 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 -> Base.Sexp.t) -> ('s -> Base.Sexp.t) -> ('a, 's) t -> Base.Sexp.t