Some tweaks for Guide section 4
This commit is contained in:
parent
ca4320467c
commit
43912bef50
|
@ -36,7 +36,7 @@ tail position with respect to the @racket[begin] form.
|
|||
|
||||
Many forms, such as @racket[lambda] or @racket[cond] support a
|
||||
sequence of expressions even without a @racket[begin]. Such positions are
|
||||
sometimes said to have an @defterm{implicit begin}.
|
||||
sometimes said to have an @deftech{implicit begin}.
|
||||
|
||||
@defexamples[
|
||||
(define (print-triangle height)
|
||||
|
|
|
@ -48,9 +48,9 @@ which is a shorthand for
|
|||
(greet "John" "Doe")
|
||||
]
|
||||
|
||||
The function shorthand via @racket[define] also supports a ``rest''
|
||||
argument (i.e., a final argument to collect extra arguments in a
|
||||
list):
|
||||
The function shorthand via @racket[define] also supports a
|
||||
@tech{rest argument} (i.e., a final argument to collect extra
|
||||
arguments in a list):
|
||||
|
||||
@specform[(define (id arg ... . rest-id) body ...+)]{}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ additional arguments.
|
|||
(max-mag)
|
||||
]
|
||||
|
||||
A @racket[_rest-id] variable is sometimes called a @defterm{rest
|
||||
A @racket[_rest-id] variable is sometimes called a @deftech{rest
|
||||
argument}, because it accepts the ``rest'' of the function arguments.
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
|
|
|
@ -49,7 +49,7 @@ guidelines may help explain when using @racket[set!] is appropriate.
|
|||
|
||||
@itemize[
|
||||
|
||||
@item{As in any modern language, assigning to shared identifier is no
|
||||
@item{As in any modern language, assigning to a shared identifier is no
|
||||
substitute for passing an argument to a procedure or getting
|
||||
its result.
|
||||
|
||||
|
@ -157,7 +157,7 @@ significantly better algorithm.
|
|||
The use of mutable values, such as vectors and hash tables, raises
|
||||
fewer suspicions about the style of a program than using @racket[set!]
|
||||
directly. Nevertheless, simply replacing @racket[set!]s in a program
|
||||
with a @racket[vector-set!]s obviously does not improve the style of
|
||||
with @racket[vector-set!]s obviously does not improve the style of
|
||||
the program.
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user