From e447bc743fa2d36fc230c2f2eec55b9ec87ee8c0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 16 Sep 2009 00:59:44 +0000 Subject: [PATCH] doc typo and style corrections svn: r16020 --- .../scribblings/guide/contracts-exists.scrbl | 8 ++++---- .../scribblings/guide/contracts-gotchas.scrbl | 4 ++-- collects/scribblings/guide/contracts-intro.scrbl | 2 +- collects/scribblings/reference/sequences.scrbl | 16 ++++++++-------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/collects/scribblings/guide/contracts-exists.scrbl b/collects/scribblings/guide/contracts-exists.scrbl index 7dc549ad05..4447f3f9d3 100644 --- a/collects/scribblings/guide/contracts-exists.scrbl +++ b/collects/scribblings/guide/contracts-exists.scrbl @@ -12,16 +12,16 @@ protect abstractions, ensuring that clients of your module cannot depend on the precise representation choices you make for your data structures. -@ctc-section{Getting started, with a stack example} +@ctc-section{Getting Started, with a Stack Example} @margin-note{ You can type @scheme[#:exists] instead of @scheme[#:∃] if you cannot easily type unicode characters; in DrScheme, typing @tt{\exists} followed by either alt-\ or control-\ (depending -on your platform) will produce @scheme[∃].}. +on your platform) will produce @scheme[∃].} The @scheme[provide/contract] form allows you to write -@schemeblock[#:∃ name-of-a-new-contract] as one of its clauses. This declaration -introduces the variable @scheme[name-of-a-new-contract], binding it to a new +@schemeblock[#:∃ _name-of-a-new-contract] as one of its clauses. This declaration +introduces the variable @scheme[_name-of-a-new-contract], binding it to a new contract that hides information about the values it protects. As an example, consider this (simple) implementation of a stack datastructure: diff --git a/collects/scribblings/guide/contracts-gotchas.scrbl b/collects/scribblings/guide/contracts-gotchas.scrbl index 5eb5c91e06..de84d5ad48 100644 --- a/collects/scribblings/guide/contracts-gotchas.scrbl +++ b/collects/scribblings/guide/contracts-gotchas.scrbl @@ -52,7 +52,7 @@ the @scheme[eq?] call would return @scheme[#t]. Moral: do not use @scheme[eq?] on values that have contracts. -@ctc-section[#:tag "exists-gotcha"]{Exists contracts and predicates} +@ctc-section[#:tag "exists-gotcha"]{Exists Contracts and Predicates} Much like the @scheme[eq?] example above, @scheme[#:∃] contracts can change the behavior of a program. @@ -73,7 +73,7 @@ but where predicates signal errors when given @scheme[#:∃] contracts. Moral: do not use predicates on @scheme[#:∃] contracts, but if you're not sure, use @schememodname[scheme/exists] to be safe. -@ctc-section{Defining recursive contracts} +@ctc-section{Defining Recursive Contracts} When defining a self-referential contract, it is natural to use @scheme[define]. For example, one might try to write a contract on diff --git a/collects/scribblings/guide/contracts-intro.scrbl b/collects/scribblings/guide/contracts-intro.scrbl index bcef700631..84bf05e6ac 100644 --- a/collects/scribblings/guide/contracts-intro.scrbl +++ b/collects/scribblings/guide/contracts-intro.scrbl @@ -194,7 +194,7 @@ something. This kind of thing happens when a module exports a function, an object, a class or other values that enable values to flow in both directions. -@ctc-section{Experimenting with examples} +@ctc-section{Experimenting with Examples} All of the contracts and module in this chapter (excluding those just following) are written using the standard @tt{#lang} syntax for diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index f4daf53a8d..415a4d22f8 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -305,7 +305,7 @@ sequence; if no more elements are available, the @section{Iterator Generators} @defmodule[scheme/generator] -@defform[(generator body ...)]{ Create a function that returns a +@defform[(generator body ...)]{ Creates a function that returns a value, usually through @scheme[yield], each time it is invoked. When the generator runs out of values to yield the last value it computed will be returned for future invocations of the generator. Generators @@ -326,7 +326,7 @@ can be safely nested. (g) ] -To use an existing generator as a sequence you should use @scheme[in-producer] +To use an existing generator as a sequence, you should use @scheme[in-producer] with a stop-value known to the generator. @examples[#:eval (generator-eval) @@ -343,10 +343,10 @@ with a stop-value known to the generator. i) ]} -@defproc[(in-generator [expr any?] ...) sequence?]{ Return a generator -that can be used as a sequence. @scheme[in-generator] takes care of the -case when @scheme[expr] stops producing values so when the @scheme[expr] -completes the generator will end. +@defproc[(in-generator [expr any?] ...) sequence?]{ Returns a generator +that can be used as a sequence. The @scheme[in-generator] procedure takes care of the +case when @scheme[expr] stops producing values, so when the @scheme[expr] +completes, the generator will end. @examples[#:eval (generator-eval) (for/list ([i (in-generator @@ -357,6 +357,6 @@ completes the generator will end. i) ]} -@defform[(yield expr)]{ Save the point of execution inside a generator -and return a value.} +@defform[(yield expr)]{ Saves the point of execution inside a generator +and returns a value.}