Sequence.Step
include Bin_prot.Binable.S2 with type ('a, 's) t := ('a, 's) t
val bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t -> Bin_prot.Shape.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.
val sexp_of_t : ('a -> Base.Sexp.t) -> ('s -> Base.Sexp.t) -> ('a, 's) t -> Base.Sexp.t