attmpet to clarify define/contract's boundary a bit more

This commit is contained in:
Robby Findler 2018-03-02 14:42:46 -06:00
parent e78eb0563a
commit 34189b38f7

View File

@ -119,11 +119,13 @@ Note that this has two potentially important impacts on the use of
@racket[deposit]: @racket[deposit]:
@itemlist[#:style 'ordered @itemlist[#:style 'ordered
@item{Since the contract will always be checked on calls to @racket[deposit], @item{The contract will be checked on any call to @racket[deposit]
even inside the module in which it is defined, this may increase that is outside of the definition of @racket[deposit] --
the number of times the contract is checked. This could lead to even those inside the module in which it is defined. Because
there may be many calls inside the module, this checking may cause
the contract to be checked too often, which could lead to
a performance degradation. This is especially true if the function a performance degradation. This is especially true if the function
is called repeatedly in loops or using recursion.} is called repeatedly from a loop.}
@item{In some situations, a function may be written to accept a more @item{In some situations, a function may be written to accept a more
lax set of inputs when called by other code in the same module. lax set of inputs when called by other code in the same module.
For such use cases, the contract boundary established by For such use cases, the contract boundary established by