doc work: set! in guide
svn: r6690 original commit: e2dfc97726ae06937b0edeb63ac7e56e05be5866
This commit is contained in:
parent
11e169f6c2
commit
2133e59ccf
|
@ -16,7 +16,9 @@
|
||||||
def+int
|
def+int
|
||||||
defs+int
|
defs+int
|
||||||
examples
|
examples
|
||||||
|
examples*
|
||||||
defexamples
|
defexamples
|
||||||
|
defexamples*
|
||||||
as-examples
|
as-examples
|
||||||
|
|
||||||
current-int-namespace
|
current-int-namespace
|
||||||
|
@ -35,7 +37,7 @@
|
||||||
(make-table
|
(make-table
|
||||||
#f
|
#f
|
||||||
(append
|
(append
|
||||||
(if title (list (list title)) null)
|
(if title (list (list (make-flow (list title)))) null)
|
||||||
(let loop ([expr-paras expr-paras]
|
(let loop ([expr-paras expr-paras]
|
||||||
[val-list+outputs val-list+outputs]
|
[val-list+outputs val-list+outputs]
|
||||||
[first? #t])
|
[first? #t])
|
||||||
|
@ -270,19 +272,36 @@
|
||||||
(interaction e ...)))]))
|
(interaction e ...)))]))
|
||||||
|
|
||||||
(define example-title
|
(define example-title
|
||||||
(make-flow (list (make-paragraph (list "Examples:")))))
|
(make-paragraph (list "Examples:")))
|
||||||
(define-syntax examples
|
(define-syntax examples
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ e ...)
|
[(_ e ...)
|
||||||
(titled-interaction example-title schemeinput* e ...)]))
|
(titled-interaction example-title schemeinput* e ...)]))
|
||||||
|
(define-syntax examples*
|
||||||
|
(syntax-rules ()
|
||||||
|
[(_ example-title e ...)
|
||||||
|
(titled-interaction example-title schemeinput* e ...)]))
|
||||||
(define-syntax defexamples
|
(define-syntax defexamples
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ e ...)
|
[(_ e ...)
|
||||||
(titled-interaction example-title schemedefinput* e ...)]))
|
(titled-interaction example-title schemedefinput* e ...)]))
|
||||||
|
(define-syntax defexamples*
|
||||||
|
(syntax-rules ()
|
||||||
|
[(_ example-title e ...)
|
||||||
|
(titled-interaction example-title schemedefinput* e ...)]))
|
||||||
|
|
||||||
(define (as-examples t)
|
(define (do-splice l)
|
||||||
(make-table #f
|
(cond
|
||||||
(list
|
[(null? l) null]
|
||||||
(list example-title)
|
[(splice? (car l)) (append (splice-run (car l))
|
||||||
(list (make-flow (list t)))))))
|
(do-splice (cdr l)))]
|
||||||
|
[else (cons (car l) (do-splice (cdr l)))]))
|
||||||
|
|
||||||
|
(define as-examples
|
||||||
|
(case-lambda
|
||||||
|
[(t) (as-examples example-title t)]
|
||||||
|
[(example-title t)
|
||||||
|
(make-table #f
|
||||||
|
(list
|
||||||
|
(list (make-flow (list example-title)))
|
||||||
|
(list (make-flow (do-splice (list t))))))])))
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
|
|
||||||
(define current-keyword-list
|
(define current-keyword-list
|
||||||
;; This is temporary, until the MzScheme manual is filled in...
|
;; This is temporary, until the MzScheme manual is filled in...
|
||||||
(make-parameter '(define require provide
|
(make-parameter '(require
|
||||||
define-values begin0 when unless
|
provide
|
||||||
new send if cond begin else => and or
|
new send else => and or
|
||||||
define-syntax syntax-rules define-struct
|
define-syntax syntax-rules define-struct
|
||||||
quote quasiquote unquote unquote-splicing
|
quote quasiquote unquote unquote-splicing
|
||||||
syntax quasisyntax unsyntax unsyntax-splicing
|
syntax quasisyntax unsyntax unsyntax-splicing
|
||||||
set!)))
|
set! set!-values)))
|
||||||
(define current-variable-list
|
(define current-variable-list
|
||||||
(make-parameter null))
|
(make-parameter null))
|
||||||
(define current-meta-list
|
(define current-meta-list
|
||||||
|
|
Loading…
Reference in New Issue
Block a user