package base

  1. Overview
  2. Docs
Module type
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
include sig ... end
val sexp_of_t : ('a -> Sexp.t) -> ('s -> Sexp.t) -> ('a, 's) t -> Sexp.t

Innovation. Community. Security.