File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
2
2
(define (world) : Any (inject 42 Integer))
3
3
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
+
4
9
(let ((x (inject (vector (inject 0 Integer)) (Vector Any))))
5
10
(let ([y (vector-set! (project x (Vector Any)) 0 (world))])
6
11
(let ((a (project x (Vector Any))))
7
12
(project (vector-ref a 0 ) Integer))))
8
13
9
14
10
15
;; ;; 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
+
11
23
;; (define (world) : Any (inject 42 Integer))
12
24
;; (let ((x (inject (vector (inject 0 Integer)) (Vector Any))))
13
25
;; (let ((a (project x (Vector Any))))
14
26
;; (let ([y (vector-set! a 0 (world))])
15
27
;; (project (vector-ref a 0) Integer))))
16
28
29
+
17
30
;; ;; Works
18
31
;; (define (world) : Any (inject 42 Integer))
19
32
;; (let ((x (vector (inject 0 Integer))))
You can’t perform that action at this time.
0 commit comments