doc patches from David Vanderson
svn: r8511
This commit is contained in:
parent
fd652aa462
commit
f1abfd55f2
|
@ -551,7 +551,7 @@ many ``hello''s as a user wants:
|
||||||
|
|
||||||
(define (reply query)
|
(define (reply query)
|
||||||
(define n (string->number (cdr (assq 'number query))))
|
(define n (string->number (cdr (assq 'number query))))
|
||||||
`(html (body ,@(for ([i (in-range n)])
|
`(html (body ,@(for/list ([i (in-range n)])
|
||||||
" hello"))))
|
" hello"))))
|
||||||
|
|
||||||
(hash-table-put! dispatch-table "many" many)
|
(hash-table-put! dispatch-table "many" many)
|
||||||
|
@ -706,7 +706,7 @@ Specifically, we need @scheme[prompt] and @scheme[abort] from
|
||||||
@schememodname[scheme/control]. We use @scheme[prompt] to mark the
|
@schememodname[scheme/control]. We use @scheme[prompt] to mark the
|
||||||
place where a servlet is started, so that we can abort a computation
|
place where a servlet is started, so that we can abort a computation
|
||||||
to that point. Change @scheme[handle] by wrapping an @scheme[prompt]
|
to that point. Change @scheme[handle] by wrapping an @scheme[prompt]
|
||||||
around the cal to @scheme[dispatch]:
|
around the call to @scheme[dispatch]:
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(define (handle in out)
|
(define (handle in out)
|
||||||
|
@ -759,7 +759,7 @@ computation.
|
||||||
|
|
||||||
In summary, the new pieces are: @scheme[(require scheme/control)],
|
In summary, the new pieces are: @scheme[(require scheme/control)],
|
||||||
adding @scheme[prompt] inside @scheme[handle], the definitions of
|
adding @scheme[prompt] inside @scheme[handle], the definitions of
|
||||||
@scheme[send/suspend], @scheme[get-number], and @scheme[sum], and
|
@scheme[send/suspend], @scheme[get-number], and @scheme[sum2], and
|
||||||
@scheme[(hash-table-put! dispatch-table "sum2" sum2)]. Once you have
|
@scheme[(hash-table-put! dispatch-table "sum2" sum2)]. Once you have
|
||||||
the server updated, visit @tt{http://localhost:8081/sum2}.
|
the server updated, visit @tt{http://localhost:8081/sum2}.
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
(define (reply query)
|
(define (reply query)
|
||||||
;; Extract and use the form results:
|
;; Extract and use the form results:
|
||||||
(define n (string->number (cdr (assq 'number query))))
|
(define n (string->number (cdr (assq 'number query))))
|
||||||
`(html (body ,@(for ([i (in-range n)])
|
`(html (body ,@(for/list ([i (in-range n)])
|
||||||
" hello"))))
|
" hello"))))
|
||||||
|
|
||||||
(hash-table-put! dispatch-table "many" many)
|
(hash-table-put! dispatch-table "many" many)
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
(define (reply query)
|
(define (reply query)
|
||||||
;; Extract and use the form results:
|
;; Extract and use the form results:
|
||||||
(define n (string->number (cdr (assq 'number query))))
|
(define n (string->number (cdr (assq 'number query))))
|
||||||
`(html (body ,@(for ([i (in-range n)])
|
`(html (body ,@(for/list ([i (in-range n)])
|
||||||
" hello"))))
|
" hello"))))
|
||||||
|
|
||||||
(hash-table-put! dispatch-table "many" many)
|
(hash-table-put! dispatch-table "many" many)
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
(define (reply query)
|
(define (reply query)
|
||||||
;; Extract and use the form results:
|
;; Extract and use the form results:
|
||||||
(define n (string->number (cdr (assq 'number query))))
|
(define n (string->number (cdr (assq 'number query))))
|
||||||
`(html (body ,@(for ([i (in-range n)])
|
`(html (body ,@(for/list ([i (in-range n)])
|
||||||
" hello"))))
|
" hello"))))
|
||||||
|
|
||||||
(hash-table-put! dispatch-table "many" many)
|
(hash-table-put! dispatch-table "many" many)
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
(define (reply query)
|
(define (reply query)
|
||||||
;; Extract and use the form results:
|
;; Extract and use the form results:
|
||||||
(define n (string->number (cdr (assq 'number query))))
|
(define n (string->number (cdr (assq 'number query))))
|
||||||
`(html (body ,@(for ([i (in-range n)])
|
`(html (body ,@(for/list ([i (in-range n)])
|
||||||
" hello"))))
|
" hello"))))
|
||||||
|
|
||||||
(hash-table-put! dispatch-table "many" many)
|
(hash-table-put! dispatch-table "many" many)
|
||||||
|
|
|
@ -152,7 +152,7 @@ MrEd script, then `#lang scheme/gui' may be the best starting point.
|
||||||
|
|
||||||
If you have R5RS code that won't fit (or that you don't want) in a
|
If you have R5RS code that won't fit (or that you don't want) in a
|
||||||
module, then you still have the R5RS language in DrScheme, and you can
|
module, then you still have the R5RS language in DrScheme, and you can
|
||||||
run via the new `plt-r5rs' command-line executable.
|
also run via the new `plt-r5rs' command-line executable.
|
||||||
|
|
||||||
Modules Using the `mzscheme' Language
|
Modules Using the `mzscheme' Language
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user