Version: 4.1

7 Contracts

This chapter is long on detail and short on the motivation and pragmatics of using contracts. See Contracts in the Guide for more of the latter and less of the former.

A contract controls the flow of values to ensure that the expectations of one party are met by another party. The provide/contract form is the primary mechanism for associating a contract with a binding.

 (require scheme/contract)

The bindings documented in this section are provided by the scheme/contract and scheme libraries, but not scheme/base.

    7.1 Data-structure Contracts

    7.2 Function Contracts

    7.3 Lazy Data-structure Contracts

    7.4 Attaching Contracts to Values

    7.5 Building New Contract Combinators

    7.6 Contract Utilities