-
Notifications
You must be signed in to change notification settings - Fork 0
/
2-49.scm
32 lines (26 loc) · 1.13 KB
/
2-49.scm
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
#lang sicp
(#%require sicp-pict)
(define (make-vect x y)
(cons x y))
(define (make-segment v1 v2)
(list v1 v2))
(define outline (list (make-segment (make-vect 0 0)
(make-vect 0 1))
(make-segment (make-vect 0 1)
(make-vect 1 1))
(make-segment (make-vect 1 1)
(make-vect 1 0))
(make-segment (make-vect 1 0)
(make-vect 0 0))))
(define x (list (make-segment (make-vect 0 0)
(make-vect 1 1))
(make-segment (make-vect 0 1)
(make-vect 1 0))))
(define diamond (list (make-segment (make-vect 0 1)
(make-vect 1 0))
(make-segment (make-vect 1 0)
(make-vect 2 1))
(make-segment (make-vect 2 1)
(make-vect 1 2))
(make-segment (make-vect 1 2)
(make-vect 0 1))))