Skip to content

Commit 9140e39

Browse files
committed
Add vect cells to diagrams.
1 parent 5280a76 commit 9140e39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

www/notes/diagrams.rkt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
(cb-superimpose (rectangle n n)
2323
(code box)))
2424

25+
(define (make-vect-cell)
26+
(cb-superimpose (rectangle n n)
27+
(code vect)))
28+
29+
2530

2631
(define (fwd-pts-to a b p)
2732
(pin-arrow-line 7 p
@@ -66,13 +71,14 @@
6671
(match v
6772
[`(cons ,_) (make-cons-cell)]
6873
[`(box ,_) (make-box-cell)]
74+
[`(vect ,_) (make-vect-cell)]
6975
[_ (make-imm-cell v)]))
7076

7177
(define (add-arrows spec cells p)
7278
;(printf "~a~n" spec)
7379
(match spec
7480
['() p]
75-
[(cons `(cons ,i) s)
81+
[(cons `(_ ,i) s)
7682
(add-arrows s
7783
cells
7884
(fwd-pts-to (list-ref cells (sub1 (- (length cells) (length s))))

0 commit comments

Comments
 (0)