package base

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

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 =
  1. | Done
  2. | Skip of 's
  3. | Yield of 'a * 's
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('s -> Sexplib0.Sexp.t) -> ('a, 's) t -> Sexplib0.Sexp.t