-
Notifications
You must be signed in to change notification settings - Fork 0
/
require_example.rkt
47 lines (34 loc) · 965 Bytes
/
require_example.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#lang racket
(require slideshow)
(require "quickstart.rkt")
(square 10)
(square 20)
(filled-circle 10)
(filled-circle 10 "red")
(four (circle 10))
(checker (colorize (square 10) "yellow")
(colorize (square 10) "blue"))
(checkerboard (square 10))
(checkerboard (filled-circle 20))
(series circle)
(series square)
(series filled-circle)
(series (lambda (size) (checkerboard (square size))))
(rgb-series circle)
(rgb-series square)
(series (rgb-maker circle))
(series (rgb-maker square))
(require slideshow/code)
(code (circle 10))
; map gives list arguments one by one
; apply gives all at once, but not as a list
(apply vc-append (rainbow (square 10)))
(apply hc-append (rainbow (square 10)))
; slideshow is the main module
; other modules are imported with "require"
(require pict/flash)
(filled-flash 40 30)
(pict+code (circle 10))
(send f show #t)
(add-drawing (pict+code (circle 10)))
(add-drawing (colorize (filled-flash 50 30) "yellow"))