Start using failure-result/c
in docs.
Not exhaustive, just what I could think of.
This commit is contained in:
parent
e358c49573
commit
965fa8e34c
|
@ -180,7 +180,8 @@ only supported for dictionary types that directly implement them.
|
|||
|
||||
@defproc[(dict-ref [dict dict?]
|
||||
[key any/c]
|
||||
[failure-result any/c (lambda () (raise (make-exn:fail ....)))])
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda () (raise (make-exn:fail ....)))])
|
||||
any]{
|
||||
|
||||
Returns the value for @racket[key] in @racket[dict]. If no value
|
||||
|
@ -471,7 +472,8 @@ Supported for any @racket[dict] that implements @racket[dict-ref] and
|
|||
@defproc[(dict-update! [dict (and/c dict? (not/c immutable?))]
|
||||
[key any/c]
|
||||
[updater (any/c . -> . any/c)]
|
||||
[failure-result any/c (lambda () (raise (make-exn:fail ....)))]) void?]{
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda () (raise (make-exn:fail ....)))]) void?]{
|
||||
|
||||
Composes @racket[dict-ref] and @racket[dict-set!] to update an
|
||||
existing mapping in @racket[dict], where the optional @racket[failure-result]
|
||||
|
@ -496,7 +498,8 @@ v
|
|||
@defproc[(dict-update [dict dict?]
|
||||
[key any/c]
|
||||
[updater (any/c . -> . any/c)]
|
||||
[failure-result any/c (lambda () (raise (make-exn:fail ....)))])
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda () (raise (make-exn:fail ....)))])
|
||||
(and/c dict? immutable?)]{
|
||||
|
||||
Composes @racket[dict-ref] and @racket[dict-set] to functionally
|
||||
|
|
|
@ -235,8 +235,9 @@ later mappings overwrite earlier mappings.
|
|||
|
||||
@defproc[(hash-ref [hash hash?]
|
||||
[key any/c]
|
||||
[failure-result any/c (lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
any]{
|
||||
|
||||
Returns the value for @racket[key] in @racket[hash]. If no value
|
||||
|
@ -277,8 +278,9 @@ Returns @racket[#t] if @racket[hash] contains a value for the given
|
|||
@defproc[(hash-update! [hash (and/c hash? (not/c immutable?))]
|
||||
[key any/c]
|
||||
[updater (any/c . -> . any/c)]
|
||||
[failure-result any/c (lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
void?]{
|
||||
|
||||
Composes @racket[hash-ref] and @racket[hash-set!] to update an
|
||||
|
@ -293,8 +295,9 @@ concurrent updates.
|
|||
@defproc[(hash-update [hash (and/c hash? immutable?)]
|
||||
[key any/c]
|
||||
[updater (any/c . -> . any/c)]
|
||||
[failure-result any/c (lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
[failure-result (failure-result/c any/c)
|
||||
(lambda ()
|
||||
(raise (make-exn:fail:contract ....)))])
|
||||
(and/c hash? immutable?)]{
|
||||
|
||||
Composes @racket[hash-ref] and @racket[hash-set] to functionally
|
||||
|
|
Loading…
Reference in New Issue
Block a user