structural-typing.global-type
If you want to mutate the state of a single global type repo, these functions support that.
on-error!
(on-error! f)Change the global type repo so that f is called when built-like fails. f is given a list of oopsies. f’s return value becomes the return value of built-like.
on-success!
(on-success! f)Change the global type repo so that f is called when built-like succeeds. f is given the original candidate structure. f’s return value becomes the return value of built-like.
start-over!
(start-over!)Reset the global type repo to its starting state: no types defined, and default handling of error and success.
type!
(type! type-signifier & condensed-type-descriptions)Modifies the global type repo to define the type type-signifier as being a structure constrained by the condensed-type-descriptions. See also named.