Skip to content

Commit a93c750

Browse files
committed
blah
1 parent b7a44c4 commit a93c750

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/s6_9.rkt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11

22
(define (world) : Any (inject 42 Integer))
33

4+
; Allocate a vector of 1 any, initialized with an injected 0, and then inject it
5+
; Project the vector and write the result of the function (world), which returns an injected 42, into the 0th element
6+
; Bind a variable to the projected vector
7+
; Read out the 0th element and project it to integer.
8+
49
(let ((x (inject (vector (inject 0 Integer)) (Vector Any))))
510
(let ([y (vector-set! (project x (Vector Any)) 0 (world))])
611
(let ((a (project x (Vector Any))))
712
(project (vector-ref a 0) Integer))))
813

914

1015
;; ;; Works
16+
17+
; Allocate a vector of 1 any, initialized with an injected 0, and then inject it
18+
; Project the vector and write the result of the function (world), which returns an injected 42, into the 0th element
19+
; Bind a variable to the projected vector
20+
; Read out the 0th element and project it to integer.
21+
22+
1123
;; (define (world) : Any (inject 42 Integer))
1224
;; (let ((x (inject (vector (inject 0 Integer)) (Vector Any))))
1325
;; (let ((a (project x (Vector Any))))
1426
;; (let ([y (vector-set! a 0 (world))])
1527
;; (project (vector-ref a 0) Integer))))
1628

29+
1730
;; ;; Works
1831
;; (define (world) : Any (inject 42 Integer))
1932
;; (let ((x (vector (inject 0 Integer))))

0 commit comments

Comments
 (0)