Small guide fixes.

Closes PR 15109.
This commit is contained in:
Vincent St-Amour 2016-01-01 12:51:20 -06:00
parent 8c8a76979b
commit 923b5864a5

View File

@ -69,10 +69,11 @@ file:
(close-output-port out) (close-output-port out)
] ]
Instead of having to match @racket[open-input-file] and Instead of having to match the open calls with close calls, most Racket
@racket[open-output-file] calls, most Racket programmers will instead programmers will use the @racket[call-with-input-file] and
use @racket[call-with-output-file], which takes a function to call @racket[call-with-output-file] functions which take a function to call to carry
with the output port; when the function returns, the port is closed. out the desired operation. This function gets as its only argument the port,
which is automatically opened and closed for the operation.
@examples[ @examples[
#:eval io-eval #:eval io-eval
@ -318,7 +319,7 @@ Other structure types created by @racket[struct], which offer
more abstraction than @tech{prefab} structure types, normally more abstraction than @tech{prefab} structure types, normally
@racket[write] either using @racketresultfont{#<....>} notation (for @racket[write] either using @racketresultfont{#<....>} notation (for
opaque structure types) or using @racketresultfont{#(....)} vector opaque structure types) or using @racketresultfont{#(....)} vector
notation (for transparent structure types). In neither can the notation (for transparent structure types). In neither case can the
result be read back in as an instance of the structure type: result be read back in as an instance of the structure type:
@interaction[ @interaction[