docs: use scribble-code-examples
This commit is contained in:
parent
50624a099b
commit
580ddfc83a
|
@ -1,6 +1,7 @@
|
||||||
#lang scribble/manual
|
#lang scribble/manual
|
||||||
|
|
||||||
@(require scribble/eval
|
@(require scribble/eval
|
||||||
|
scribble-code-examples
|
||||||
(for-label (except-in racket/base
|
(for-label (except-in racket/base
|
||||||
read read-syntax)
|
read read-syntax)
|
||||||
(except-in afl/reader
|
(except-in afl/reader
|
||||||
|
@ -24,10 +25,11 @@ that adds @racketmodname[rackjure]-like anonymous function literals to a languag
|
||||||
For example, @racket[@#,hash-lang[] @#,racketmodname[afl] @#,racketmodname[racket/base]]
|
For example, @racket[@#,hash-lang[] @#,racketmodname[afl] @#,racketmodname[racket/base]]
|
||||||
adds anonymous function literals to @racketmodname[racket/base], so that
|
adds anonymous function literals to @racketmodname[racket/base], so that
|
||||||
@codeblock{
|
@codeblock{
|
||||||
#lang afl racket/base
|
#lang afl racket/base}
|
||||||
|
@code-examples[#:lang "afl racket/base" #:context #'here]|{
|
||||||
(map #λ(+ % 1) '(1 2 3))
|
(map #λ(+ % 1) '(1 2 3))
|
||||||
}
|
(map #λ(+ % %2) '(1 2 3) '(1 2 3))
|
||||||
produces @racket['(2 3 4)]
|
}|
|
||||||
|
|
||||||
For the @racketmodname[afl] language to work properly for a module, the module
|
For the @racketmodname[afl] language to work properly for a module, the module
|
||||||
has to depend on @racketmodname[racket/base] in some way, although that does not
|
has to depend on @racketmodname[racket/base] in some way, although that does not
|
||||||
|
|
4
info.rkt
4
info.rkt
|
@ -2,5 +2,7 @@
|
||||||
|
|
||||||
(define collection 'multi)
|
(define collection 'multi)
|
||||||
|
|
||||||
(define deps '("base" "at-exp-lib" "rackjure" "rackunit-lib" "racket-doc" "scribble-doc" "scribble-lib"))
|
(define deps '("base" "at-exp-lib" "rackjure" "rackunit-lib"))
|
||||||
|
|
||||||
|
(define build-deps '("scribble-lib" "racket-doc" "scribble-doc" "scribble-code-examples"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user