convert "quick" document to mostly use picts directly in examples
|
@ -1,89 +1,15 @@
|
|||
((2) 0 () 0 () () 5)
|
||||
((2) 0 () 0 () () 5)
|
||||
((2) 0 () 0 () () (c begin c "art gallery"))
|
||||
((2) 0 () 0 () () "art gallery")
|
||||
((2) 0 () 0 () () (c circle c 10))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img0") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c rectangle c 10 c 20))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img1") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c circle c 10 c 20))
|
||||
((2) 1 (((lib "scriblib/private/gui-eval-exn.rkt") . deserialize-info:gui-exn-v0)) 0 () () (0 "procedure circle: expects 1 argument, given 2: 10 20"))
|
||||
((2) 0 () 0 () () (c hc-append c (c circle c 10) c (c rectangle c 10 c 20)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img2") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c c c (c circle c 10)))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c define c r c (c rectangle c 10 c 20)))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () r)
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img3") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c hc-append c c c r))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img4") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c hc-append c 20 c c c r c c))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img5") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c square c n) c (c filled-rectangle c n c n)))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c square c 10))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img6") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c four c p) c (c define c two-p c (c hc-append c p c p)) c (c vc-append c two-p c two-p)))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c four c (c circle c 10)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img7") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c checker c p1 c p2) c (c let c (c (c p12 c (c hc-append c p1 c p2)) c (c p21 c (c hc-append c p2 c p1))) c (c vc-append c p12 c p21))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c checker c (c colorize c (c square c 10) c "red") c (c colorize c (c square c 10) c "black")))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img8") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c checkerboard c p) c (c let* c (c (c rp c (c colorize c p c "red")) c (c bp c (c colorize c p c "black")) c (c c c (c checker c rp c bp)) c (c c4 c (c four c c))) c (c four c c4))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c checkerboard c (c square c 10)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img9") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () circle)
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#<procedure:circle>"))))
|
||||
((2) 0 () 0 () () (c define c (c series c mk) c (c hc-append c 4 c (c mk c 5) c (c mk c 10) c (c mk c 20))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c series c circle))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img10") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c series c square))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img11") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c series c (c lambda c (c size) c (c checkerboard c (c square c size)))))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img12") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c rgb-series c mk) c (c vc-append c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "red"))) c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "green"))) c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "blue"))))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c rgb-series c circle))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img13") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c rgb-series c square))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img14") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define c (c rgb-maker c mk) c (c lambda c (c sz) c (c vc-append c (c colorize c (c mk c sz) c "red") c (c colorize c (c mk c sz) c "green") c (c colorize c (c mk c sz) c "blue")))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c series c (c rgb-maker c circle)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img15") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c series c (c rgb-maker c square)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img16") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c list c "red" c "green" c "blue"))
|
||||
((2) 0 () 0 () () (c "red" c "green" c "blue"))
|
||||
((2) 0 () 0 () () (c list c (c circle c 10) c (c square c 10)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img17") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img18") (? . 1) 1.0)))
|
||||
((2) 0 () 0 () () (c define c (c rainbow c p) c (c map c (c lambda c (c color) c (c colorize c p c color)) c (c list c "red" c "orange" c "yellow" c "green" c "blue" c "purple"))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c rainbow c (c square c 5)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img19") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img20") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img21") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img22") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img23") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img24") (? . 1) 1.0)))
|
||||
((2) 0 () 0 () () (c apply c vc-append c (c rainbow c (c square c 5))))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img25") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c require c slideshow/flash))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c filled-flash c 40 c 30))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img26") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c require c (c planet c "random.rkt" c (c "schematics" c "random.plt" c 1 c 0))))
|
||||
((2) 0 () 0 () () (c require c (c planet c schematics/random:1:0/random)))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c random-gaussian))
|
||||
((2) 0 () 0 () () 0.7386912134436788)
|
||||
((2) 0 () 0 () () (c require c slideshow/code))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c code c (c circle c 10)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img27") (c ".pdf" c ".png") 1.0))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img0") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c define-syntax c pict+code c (c syntax-rules c () c (c (c pict+code c expr) c (c hc-append c 10 c expr c (c code c expr))))))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c pict+code c (c circle c 10)))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img28") (c ".pdf" c ".png") 1.0))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img1") (c ".pdf" c ".png") 1.0))
|
||||
((2) 0 () 0 () () (c require c racket/class c racket/gui/base))
|
||||
((2) 0 () 0 () () (void))
|
||||
((2) 0 () 0 () () (c define c f c (c new c frame% c (c label c "My Art") c (c width c 300) c (c height c 300) c (c alignment c (c quote c (c center c center))))))
|
||||
|
@ -97,6 +23,6 @@
|
|||
((2) 0 () 0 () () (c add-drawing c (c pict+code c (c circle c 10))))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)"))))
|
||||
((2) 0 () 0 () () (c add-drawing c (c colorize c (c filled-flash c 50 c 30) c "yellow")))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)"))))
|
||||
((2) 1 (((lib "scriblib/private/gui-eval-exn.rkt") . deserialize-info:gui-exn-v0)) 0 () () (0 "reference to undefined identifier: filled-flash"))
|
||||
((2) 0 () 0 () () (c scale c (c bitmap c (c build-path c (c collection-path c "scribblings/quick") c "art.png")) c 0.5))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img29") (c ".pdf" c ".png") 1.0))
|
||||
((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img2") (c ".pdf" c ".png") 1.0))
|
||||
|
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 93 B After Width: | Height: | Size: 3.7 KiB |
|
@ -1,80 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœE<EFBFBD>Kn1D÷œ‚8€ñï‘f—ɼˆiQ¹~(ÛÓ£–»°yØ?,IYð<1D>z»7þú%á?R¾Åú¦Eðý<C3B0>\¸U~@«§QgMâ™Keü'uœË:º¨e›Q§·…?™±l¹S(b¿0?¾OÒbÜ%:#(-
cÍžd€R5H4;çlË<)4¶ð<9µm†N:×a¹ØÓcd÷=‚\R·¸D–ž´Ç:ž<>LGd"Ôþ¢¯*Ô–jÝ^h<Ä.‡
ºôtÆôW!R:endstream
|
||||
endobj
|
||||
6 0 obj
|
||||
214
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 35 16]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:54-06:00' xap:CreateDate='2010-04-22T13:55:54-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9bd8d72d-8665-11ea-0000-34a7f4bf94ee'/>
|
||||
<rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135554-06'00')
|
||||
/ModDate(D:20100422135554-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000506 00000 n
|
||||
0000002090 00000 n
|
||||
0000000447 00000 n
|
||||
0000000318 00000 n
|
||||
0000000015 00000 n
|
||||
0000000299 00000 n
|
||||
0000000570 00000 n
|
||||
0000000611 00000 n
|
||||
0000000640 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<773F739C40C01D398B1ACA4FA8323A87><773F739C40C01D398B1ACA4FA8323A87>]
|
||||
>>
|
||||
startxref
|
||||
2278
|
||||
%%EOF
|
Before Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,80 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœmŽ1à EwŸÂ'hl <20>Tê–p„*<2A>T©CÓ¡×/6aÀ<61>0B|Þ{#]IÖqÞ_0, ·Ôû¾¡OIí+<Jð-Ý[ÙÏcj¹Ú©É¡<C389>„“–¾³IžzGȱn; sùž›<C5BE>ccÃÍ ë¨<C3AB>#kÐ%Õ <C395>:Š<><C5A0>Ô`4ÒP<C392>ÑòƒÅ‡?ú Û<>gøv]S¡endstream
|
||||
endobj
|
||||
6 0 obj
|
||||
151
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 35 48]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:55-06:00' xap:CreateDate='2010-04-22T13:55:55-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9c716dad-8665-11ea-0000-de937bc06cc7'/>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135555-06'00')
|
||||
/ModDate(D:20100422135555-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000443 00000 n
|
||||
0000002027 00000 n
|
||||
0000000384 00000 n
|
||||
0000000255 00000 n
|
||||
0000000015 00000 n
|
||||
0000000236 00000 n
|
||||
0000000507 00000 n
|
||||
0000000548 00000 n
|
||||
0000000577 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<CB114AF944A7F85D520FBB25E1E9B5DD><CB114AF944A7F85D520FBB25E1E9B5DD>]
|
||||
>>
|
||||
startxref
|
||||
2215
|
||||
%%EOF
|
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,80 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœmŽQ @ÿ{Šž@[œc70ñÏq£KLüp~x}[Àʺ<08>×—¼ÒŽ‘tÕûú„ýqzCyφc<E280A0>éžop—<70><E28094>гœG<C593>O~*É›ÏÎgsØ9ʲÃÑ9J²³ é߆<>°ì,YœGM<47>"ZX–çQÓ'ˆƒ³j GM!„q_Î2rƒ6<C692>JÄ\KÝ MÒ•YsW,Á¾}hÑendstream
|
||||
endobj
|
||||
6 0 obj
|
||||
162
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 35 48]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:55-06:00' xap:CreateDate='2010-04-22T13:55:55-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9c716dad-8665-11ea-0000-11040068121c'/>
|
||||
<rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135555-06'00')
|
||||
/ModDate(D:20100422135555-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000454 00000 n
|
||||
0000002038 00000 n
|
||||
0000000395 00000 n
|
||||
0000000266 00000 n
|
||||
0000000015 00000 n
|
||||
0000000247 00000 n
|
||||
0000000518 00000 n
|
||||
0000000559 00000 n
|
||||
0000000588 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<2D22C5E6138860AE600CF56ED7C7E964><2D22C5E6138860AE600CF56ED7C7E964>]
|
||||
>>
|
||||
startxref
|
||||
2226
|
||||
%%EOF
|
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 76 B |
Before Width: | Height: | Size: 76 B |
Before Width: | Height: | Size: 76 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 77 B |
|
@ -1,81 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœu<EFBFBD>M
|
||||
Â0F÷sŠœ <20>Äé8=<3D>Ð<EFBFBD>íD‚ëÂë›™ÖȤ ùù¾÷}Œ) ~ûzy@7Ãò‚í¼.€!#²±^áV.Þ%˼ïéÔ¶fM"“ÐW“Øi\Á® †TÑÜ ©2Ù1øc¤ytE¤!42‚B#È‘3ýAZîI¤lJ„¼i¼åÙÔÎ|†æúNŒendstream
|
||||
endobj
|
||||
6 0 obj
|
||||
152
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 4 24]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:57-06:00' xap:CreateDate='2010-04-22T13:55:57-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9da29aad-8665-11ea-0000-fcfa74cec07e'/>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135557-06'00')
|
||||
/ModDate(D:20100422135557-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000443 00000 n
|
||||
0000002027 00000 n
|
||||
0000000384 00000 n
|
||||
0000000256 00000 n
|
||||
0000000015 00000 n
|
||||
0000000237 00000 n
|
||||
0000000507 00000 n
|
||||
0000000548 00000 n
|
||||
0000000577 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<E91F774EC89995D6400B03C9EA77D9E7><E91F774EC89995D6400B03C9EA77D9E7>]
|
||||
>>
|
||||
startxref
|
||||
2215
|
||||
%%EOF
|
Before Width: | Height: | Size: 102 B |
|
@ -1,80 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœí<EFBFBD>½
1…{OášÂ؉“óM€DÇ1‡@Áúø!€EQÿ|~~7däå|ÞÃÖÓ€óÞQ¼Ï£H"^!Jšg/l$UAMãhK$2¥˜Pã·†K<E280A0>Ð ™G<E284A2>Hfêñ†4vé…™Õ:ÄÂL–»1ZÚ›’¦ó›dÓ®_,“rîfˆJMÕáT‰\<5C>u…’«+¶ÞjCãW«š†ãÊ5>Apë÷ü±xÚü-þ<>Å'ØÃ^µØŽ{endstream
|
||||
endobj
|
||||
6 0 obj
|
||||
196
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 32 23]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:57-06:00' xap:CreateDate='2010-04-22T13:55:57-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9da29aad-8665-11ea-0000-2bb5249de6dd'/>
|
||||
<rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135557-06'00')
|
||||
/ModDate(D:20100422135557-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000488 00000 n
|
||||
0000002072 00000 n
|
||||
0000000429 00000 n
|
||||
0000000300 00000 n
|
||||
0000000015 00000 n
|
||||
0000000281 00000 n
|
||||
0000000552 00000 n
|
||||
0000000593 00000 n
|
||||
0000000622 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<6C51B73DC3A90C9A3E8D707F4552676C><6C51B73DC3A90C9A3E8D707F4552676C>]
|
||||
>>
|
||||
startxref
|
||||
2260
|
||||
%%EOF
|
Before Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 93 B |
|
@ -1,82 +0,0 @@
|
|||
%PDF-1.4
|
||||
%Çì<C387>¢
|
||||
5 0 obj
|
||||
<</Length 6 0 R/Filter /FlateDecode>>
|
||||
stream
|
||||
xœ=MAÂ0»ç~AçTcK_€Ä<E282AC>ñ„jBBÚ8ð}’Ò¢$²ÛÉL
|
||||
Fu¬‡LÛŠû[ˆ<>(.>ilg1Âû<©(3–œhÅ0³wíÒ©ákÉê§œ$“æ–
|
||||
¨2޳¿ÕzöÂB¼v_\åUñ$ãendstream
|
||||
endobj
|
||||
6 0 obj
|
||||
120
|
||||
endobj
|
||||
4 0 obj
|
||||
<</Type/Page/MediaBox [0 0 16 16]
|
||||
/Parent 3 0 R
|
||||
/Resources<</ProcSet[/PDF]
|
||||
/ExtGState 8 0 R
|
||||
>>
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Type /Pages /Kids [
|
||||
4 0 R
|
||||
] /Count 1
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<</Type /Catalog /Pages 3 0 R
|
||||
/Metadata 9 0 R
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<</Type/ExtGState
|
||||
/OPM 1>>endobj
|
||||
8 0 obj
|
||||
<</R7
|
||||
7 0 R>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<</Type/Metadata
|
||||
/Subtype/XML/Length 1374>>stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||
<?adobe-xap-filters esc="CRLF"?>
|
||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
<rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
|
||||
<rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:53-06:00' xap:CreateDate='2010-04-22T13:55:53-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
|
||||
<rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9b4040ad-8665-11ea-0000-2bb4b895d559'/>
|
||||
<rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
<?xpacket end='w'?>
|
||||
endstream
|
||||
endobj
|
||||
2 0 obj
|
||||
<</Producer(GPL Ghostscript 8.63)
|
||||
/CreationDate(D:20100422135553-06'00')
|
||||
/ModDate(D:20100422135553-06'00')
|
||||
/Creator(PLT Scheme)
|
||||
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
|
||||
xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000412 00000 n
|
||||
0000001996 00000 n
|
||||
0000000353 00000 n
|
||||
0000000224 00000 n
|
||||
0000000015 00000 n
|
||||
0000000205 00000 n
|
||||
0000000476 00000 n
|
||||
0000000517 00000 n
|
||||
0000000546 00000 n
|
||||
trailer
|
||||
<< /Size 10 /Root 1 0 R /Info 2 0 R
|
||||
/ID [<18F7F7D89292F20542678B75862EDC0C><18F7F7D89292F20542678B75862EDC0C>]
|
||||
>>
|
||||
startxref
|
||||
2184
|
||||
%%EOF
|
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 200 B |
|
@ -1,6 +1,6 @@
|
|||
#lang racket/base
|
||||
|
||||
(require scriblib/gui-eval)
|
||||
(require scribble/eval
|
||||
scriblib/gui-eval)
|
||||
|
||||
(provide (rename-out [gui-interaction mr-interaction]
|
||||
[gui-interaction-eval mr-interaction-eval]
|
||||
|
@ -9,3 +9,24 @@
|
|||
[gui-def+int mr-def+int]
|
||||
[gui-defs+int mr-defs+int]
|
||||
[gui-interaction-eval-show mr-interaction-eval-show]))
|
||||
|
||||
(define ss-eval (make-base-eval))
|
||||
(void (interaction-eval #:eval ss-eval (require slideshow/pict)))
|
||||
|
||||
(define-syntax-rule (ss-interaction e ...)
|
||||
(interaction #:eval ss-eval e ...))
|
||||
(define-syntax-rule (ss-interaction-eval e ...)
|
||||
(interaction-eval #:eval ss-eval e ...))
|
||||
(define-syntax-rule (ss-racketmod+eval e ...)
|
||||
(racketmod+eval #:eval ss-eval e ...))
|
||||
(define-syntax-rule (ss-racketblock+eval e ...)
|
||||
(racketblock+eval #:eval ss-eval e ...))
|
||||
(define-syntax-rule (ss-def+int e ...)
|
||||
(def+int #:eval ss-eval e ...))
|
||||
|
||||
(provide ss-interaction
|
||||
ss-interaction-eval
|
||||
ss-racketmod+eval
|
||||
ss-racketblock+eval
|
||||
ss-def+int)
|
||||
|
||||
|
|
|
@ -66,13 +66,13 @@ window and hit Enter, DrRacket evaluates the expression and prints its
|
|||
result. An expression can be just a value, such as the number
|
||||
@racket[5] or the string @racket["art gallery"]:
|
||||
|
||||
@mr-interaction[5 "art gallery"]
|
||||
@ss-interaction[5 "art gallery"]
|
||||
|
||||
An expression can also be a function call. To call a function, put
|
||||
an open parenthesis before the function name, then expressions for the
|
||||
function arguments, and then a close parenthesis, like this:
|
||||
|
||||
@mr-interaction[(circle 10)]
|
||||
@ss-interaction[(circle 10)]
|
||||
|
||||
A result from the @racket[circle] function is a picture value, which
|
||||
prints as an expression result in much the same way that numbers or
|
||||
|
@ -80,12 +80,12 @@ strings print. The argument to @racket[circle] determines the
|
|||
circle's size in pixels. As you might guess, there's a
|
||||
@racket[rectangle] function that takes two arguments instead of one:
|
||||
|
||||
@mr-interaction[(rectangle 10 20)]
|
||||
@ss-interaction[(rectangle 10 20)]
|
||||
|
||||
Try giving @racket[circle] the wrong number of arguments, just to see
|
||||
what happens:
|
||||
|
||||
@mr-interaction[(circle 10 20)]
|
||||
@ss-interaction[(circle 10 20)]
|
||||
|
||||
Note that DrRacket highlights in pink the expression that triggered
|
||||
the error (but pink highlighting is not shown in this documentation).
|
||||
|
@ -95,7 +95,7 @@ In addition to basic picture constructors like @racket[circle] and
|
|||
combines pictures. When you start composing function calls in Racket,
|
||||
it looks like this:
|
||||
|
||||
@mr-interaction[(hc-append (circle 10) (rectangle 10 20))]
|
||||
@ss-interaction[(hc-append (circle 10) (rectangle 10 20))]
|
||||
|
||||
The hyphen in the name @racket[hc-append] is just a part of the
|
||||
identifier; it's not @racketidfont{hc} minus
|
||||
|
@ -122,7 +122,7 @@ simpler to give them names. Move back to the definitions area (the top
|
|||
area) and add two definitions, so that the complete content of the
|
||||
definitions area looks like this:
|
||||
|
||||
@mr-racketmod+eval[
|
||||
@ss-racketmod+eval[
|
||||
slideshow
|
||||
(define c (circle 10))
|
||||
(define r (rectangle 10 20))
|
||||
|
@ -131,7 +131,7 @@ slideshow
|
|||
Then click @onscreen{Run} again. Now, you can just type @racket[c] or
|
||||
@racket[r]:
|
||||
|
||||
@mr-interaction[r (hc-append c r) (hc-append 20 c r c)]
|
||||
@ss-interaction[r (hc-append c r) (hc-append 20 c r c)]
|
||||
|
||||
As you can see, the @racket[hc-append] function accepts an optional
|
||||
number argument before the picture arguments, and it accepts any
|
||||
|
@ -149,7 +149,7 @@ uses @racket[define], just like our shape definitions, but with an
|
|||
open parenthesis before the function name, and names for the function
|
||||
arguments before the matching close parenthesis:
|
||||
|
||||
@mr-racketblock+eval[
|
||||
@ss-racketblock+eval[
|
||||
(define (square n)
|
||||
(code:comment @#,t{A semi-colon starts a line comment.})
|
||||
(code:comment @#,t{The expression below is the function body.})
|
||||
|
@ -159,7 +159,7 @@ arguments before the matching close parenthesis:
|
|||
The syntax of the definition mirrors the syntax of a function
|
||||
call:
|
||||
|
||||
@mr-interaction[(square 10)]
|
||||
@ss-interaction[(square 10)]
|
||||
|
||||
In the same way that definitions can be evaluated in the interactions
|
||||
area, expressions can be included in the definitions area. When a
|
||||
|
@ -176,7 +176,7 @@ definition area.
|
|||
The @racket[define] form can be used in some places to create local
|
||||
bindings. For example, it can be used inside a function body:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (four p)
|
||||
(define two-p (hc-append p p))
|
||||
(vc-append two-p two-p))
|
||||
|
@ -188,7 +188,7 @@ for local binding. An advantage of @racket[let] is that it can be used
|
|||
in any expression position. Also, it binds many identifiers at once,
|
||||
instead of requiring a separate @racket[define] for each identifier:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (checker p1 p2)
|
||||
(let ([p12 (hc-append p1 p2)]
|
||||
[p21 (hc-append p2 p1)])
|
||||
|
@ -201,7 +201,7 @@ A @racket[let] form binds many identifiers at the same time, so the
|
|||
bindings cannot refer to each other. The @racket[let*] form, in
|
||||
contrast, allows later bindings to use earlier bindings:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (checkerboard p)
|
||||
(let* ([rp (colorize p "red")]
|
||||
[bp (colorize p "black")]
|
||||
|
@ -217,7 +217,7 @@ contrast, allows later bindings to use earlier bindings:
|
|||
Instead of calling @racket[circle] as a function, try evaluating just
|
||||
@racket[circle] as an expression:
|
||||
|
||||
@mr-interaction[circle]
|
||||
@ss-interaction[circle]
|
||||
|
||||
That is, the identifier @racket[circle] is bound to a function
|
||||
(a.k.a. ``procedure''), just like @racket[c] is bound to a
|
||||
|
@ -230,7 +230,7 @@ pictures (even if they don't print as nicely). Since functions are
|
|||
values, you can define functions that expect other functions as
|
||||
arguments:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (series mk)
|
||||
(hc-append 4 (mk 5) (mk 10) (mk 20)))
|
||||
(series circle)
|
||||
|
@ -244,7 +244,7 @@ have to make up a name and find a place to put the function
|
|||
definition. The alternative is to use @racket[lambda], which creates an
|
||||
anonymous function:
|
||||
|
||||
@mr-interaction[(series (lambda (size) (checkerboard (square size))))]
|
||||
@ss-interaction[(series (lambda (size) (checkerboard (square size))))]
|
||||
|
||||
The parenthesized names after a @racket[lambda] are the arguments to
|
||||
the function, and the expression after the argument names is the
|
||||
|
@ -278,7 +278,7 @@ of @racket[mk] in each @racket[lambda] form to refer to the argument of
|
|||
@racket[rgb-series], since that's the binding that is textually in
|
||||
scope:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (rgb-series mk)
|
||||
(vc-append
|
||||
(series (lambda (sz) (colorize (mk sz) "red")))
|
||||
|
@ -291,7 +291,7 @@ scope:
|
|||
Here's another example, where @racket[rgb-maker] takes a function and
|
||||
returns a new one that remembers and uses the original function.
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (rgb-maker mk)
|
||||
(lambda (sz)
|
||||
(vc-append (colorize (mk sz) "red")
|
||||
|
@ -315,7 +315,7 @@ part of Racket.
|
|||
The @racket[list] function takes any number of arguments and returns
|
||||
a list containing the given values:
|
||||
|
||||
@mr-interaction[(list "red" "green" "blue")
|
||||
@ss-interaction[(list "red" "green" "blue")
|
||||
(list (circle 10) (square 10))]
|
||||
|
||||
As you can see, a list prints as a single quote and then pair of parentheses wrapped around
|
||||
|
@ -332,7 +332,7 @@ each of the elements. The @racket[map] function takes a list and a
|
|||
function to apply to each element of the list; it returns a new list
|
||||
to combine the function's results:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(define (rainbow p)
|
||||
(map (lambda (color)
|
||||
(colorize p color))
|
||||
|
@ -347,7 +347,7 @@ each one individually. The @racket[apply] function is especially
|
|||
useful with functions that take any number of arguments, such as
|
||||
@racket[vc-append]:
|
||||
|
||||
@mr-interaction[
|
||||
@ss-interaction[
|
||||
(apply vc-append (rainbow (square 5)))
|
||||
]
|
||||
|
||||
|
@ -375,7 +375,7 @@ To import additional libraries, use the @racket[require] form. For
|
|||
example, the library @racketmodname[slideshow/flash] provides a
|
||||
@racket[filled-flash] function:
|
||||
|
||||
@mr-def+int[
|
||||
@ss-def+int[
|
||||
(require slideshow/flash)
|
||||
(filled-flash 40 30)
|
||||
]
|
||||
|
@ -398,13 +398,13 @@ Modules are named and distributed in various ways:
|
|||
that you evaluate the following fragment:
|
||||
|
||||
@mr-def+int[
|
||||
(require (planet "random.rkt" ("schematics" "random.plt" 1 0)))
|
||||
(require (planet schematics/random:1:0/random))
|
||||
(random-gaussian)
|
||||
]
|
||||
|
||||
DrRacket automatically downloads version 1.0 of the
|
||||
@filepath{random.plt} library and then imports the
|
||||
@filepath{random.rkt} module.}
|
||||
@filepath{random.plt} library by @filepath{schematics} and then
|
||||
imports the @filepath{random.rkt} module.}
|
||||
|
||||
@item{Some modules live relative to other modules, without
|
||||
necessarily belonging to any particular collection or package.
|
||||
|
@ -517,7 +517,8 @@ classes. By convention, the classes are given names that end with
|
|||
@racket[%]:
|
||||
|
||||
@mr-defs+int[
|
||||
[(require racket/class racket/gui/base)
|
||||
[(require racket/class
|
||||
racket/gui/base)
|
||||
(define f (new frame% [label "My Art"]
|
||||
[width 300]
|
||||
[height 300]
|
||||
|
|