A generator defined by a function called the first time it is drawn from (or its label is needed), so a definition can refer to generators defined after it, including itself:
type Tree = null | [Tree, Tree];
const tree: Generator<Tree> = deferred(() => oneOf<Tree>(just(null), tuples(tree, tree)));
A definition that always refers back to itself is cut off by the engine's
limit on nested spans, which rejects the test case. A definition that
resolves only to itself throws when drawn from. For recursive data with
engine-controlled size, prefer recursive. It prints as the
generator definition returns does.
A generator defined by a function called the first time it is drawn from (or its label is needed), so a definition can refer to generators defined after it, including itself:
A definition that always refers back to itself is cut off by the engine's limit on nested spans, which rejects the test case. A definition that resolves only to itself throws when drawn from. For recursive data with engine-controlled size, prefer recursive. It prints as the generator
definitionreturns does.