8.16.0.1
5 contract
(require phc-toolkit/contract) | package: phc-toolkit |
procedure
(regexp-match/c rx) → contract?
rx : (or/c string? regexp?)
=
(and/c (or/c string? bytes? path? input-port?) (curry regexp-match? rx))
Returns a contract which accepts only values matching the given regular
expression.
Returns a contract which accepts only identifiers which are
free-identifier=? to id.
syntax
Like define/contract, but later versions of this library may allow
disabling the contracts via a parameter or syntax parameter. This form will be
useful for internal functions, to ease debugging during development, but with
the (future) possibility of disabling the contracts in the final version, to
avoid the performance cost of checking many contracts between internal
functions.
5.1 Untyped versions of contract
(require phc-toolkit/untyped/contract) | |
package: phc-toolkit |