# Module Sequence.Step

    module Step: sig .. end

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.

    type ('a, 's) t =

`|` | `Done`
`|` | `Skip of `'s``
`|` | `Yield of `'a * 's``

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