fix wrong name in docs

This commit is contained in:
Robby Findler 2016-10-23 22:54:29 -05:00
parent b826b176d2
commit 1b834d010a

View File

@ -126,18 +126,18 @@ and how they can be used to implement contracts.
@section[#:tag "data-structure-contracts"]{Data-structure Contracts}
@declare-exporting-ctc[racket/contract/base]
@defproc[(flat-contract-with-reason [get-reason (-> any/c (or/c boolean? (-> blame? any)))])
@defproc[(flat-contract-with-explanation [get-explanation (-> any/c (or/c boolean? (-> blame? any)))])
flat-contract?]{
Provides a way to use flat contracts that, when a contract fails,
provide more information about the failure.
If @racket[get-reason] returns a boolean, then that boolean value is
If @racket[get-explanation] returns a boolean, then that boolean value is
treated as the predicate in a @tech{flat contract}. If it returns
a procedure, then it is treated similarly to returning @racket[#f],
except the result procedure is called to actually signal the contract
violation.
@racketblock[(flat-contract-with-reason
@racketblock[(flat-contract-with-explanation
(λ (val)
(cond
[(even? val) #t]
@ -2098,7 +2098,7 @@ accepted by the third argument to @racket[datum->syntax].
These functions build simple higher-order contracts, @tech{chaperone contracts},
and @tech{flat contracts}, respectively. They both take the same set of three
optional arguments: a name, a first-order predicate, and a blame-tracking projection.
For @racket[make-flat-contract], see also @racket[flat-contract-with-reason].
For @racket[make-flat-contract], see also @racket[flat-contract-with-explanation].
The @racket[name] argument is any value to be rendered using @racket[display] to
describe the contract when a violation occurs. The default name for simple