Fix more doc typoes.
Closes PR 11694.
Merge to 5.1.
(cherry picked from commit 2935170eff
)
This commit is contained in:
parent
63af7b4af0
commit
e0029e50a8
|
@ -16,7 +16,7 @@ Mitchell and McKim's principles for design by contract DbC are derived
|
|||
from the 1970s style algebraic specifications. The overall goal of DbC is
|
||||
to specify the constructors of an algebra in terms of its
|
||||
observers. While we reformulate Mitchell and McKim's terminology and
|
||||
we use a mostly applicative, we
|
||||
we use a mostly applicative approach, we
|
||||
retain their terminology of ``classes'' and ``objects'':
|
||||
|
||||
@itemize[
|
||||
|
@ -28,7 +28,7 @@ Mitchell and McKim's principles for design by contract DbC are derived
|
|||
implementation a command typically returns an new object of the same
|
||||
class.}
|
||||
|
||||
@item{@bold{Separate basic queries from derived queries}
|
||||
@item{@bold{Separate basic queries from derived queries.}
|
||||
|
||||
A @italic{derived query} returns a result that is computable in
|
||||
terms of basic queries.}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
[initialize
|
||||
(->d ([p contract?] [s (p p . -> . boolean?)])
|
||||
()
|
||||
;; Mitchel and McKim use (= (count s) 0) here to express
|
||||
;; Mitchell and McKim use (= (count s) 0) here to express
|
||||
;; the post-condition in terms of a primitive query
|
||||
[result (and/c stack? is-empty?)])]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#lang racket
|
||||
|
||||
;; Note: this queue doesn't implement the capacity restriction
|
||||
;; of McKim and Mitchell's queue but this is easy to add.
|
||||
;; of Mitchell and McKim's queue but this is easy to add.
|
||||
|
||||
;; a contract utility
|
||||
(define (all-but-last l) (reverse (cdr (reverse l))))
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
;; primitive queries
|
||||
;; Imagine providing this 'query' for the interface of the module
|
||||
;; only. Then in Scheme, there is no reason to have count or is-empty?
|
||||
;; only. Then in Racket there is no reason to have count or is-empty?
|
||||
;; around (other than providing it to clients). After all items is
|
||||
;; exactly as cheap as count.
|
||||
[items (->d ([q queue?]) () [result (listof (queue-p? q))])]
|
||||
|
|
Loading…
Reference in New Issue
Block a user