From 34189b38f77dd255e57f6f49da76a1304f18d798 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 2 Mar 2018 14:42:46 -0600 Subject: [PATCH] attmpet to clarify define/contract's boundary a bit more --- .../scribblings/guide/contracts/simple-function.scrbl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/racket-doc/scribblings/guide/contracts/simple-function.scrbl b/pkgs/racket-doc/scribblings/guide/contracts/simple-function.scrbl index 9c77252b11..891553d9a1 100644 --- a/pkgs/racket-doc/scribblings/guide/contracts/simple-function.scrbl +++ b/pkgs/racket-doc/scribblings/guide/contracts/simple-function.scrbl @@ -119,11 +119,13 @@ Note that this has two potentially important impacts on the use of @racket[deposit]: @itemlist[#:style 'ordered - @item{Since the contract will always be checked on calls to @racket[deposit], - even inside the module in which it is defined, this may increase - the number of times the contract is checked. This could lead to + @item{The contract will be checked on any call to @racket[deposit] + that is outside of the definition of @racket[deposit] -- + 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 - 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 lax set of inputs when called by other code in the same module. For such use cases, the contract boundary established by