File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 44
44
45
45
;(Sequenceof (Sequence (Sequenceof Real))) does not work because (sequence? 5) = #t
46
46
;and so the contract can not know if '((2 2)) is three or two nested sequences
47
- (define-type LVof (All (A) (U (Listof A) (Vectorof A))))
47
+ (define-type (LVof A)
48
+ (U (Listof A) (Vectorof A)))
49
+
48
50
(:: arrows
49
51
(->* [(U (LVof (LVof Real))
50
52
(LVof (LVof (LVof Real))))]
113
115
[v2 (in-list (cdr S1*))])
114
116
(cons v1 v2))]
115
117
[else S2]))
116
-
118
+
117
119
;; calculate bound and pick right render-fun
118
120
(define rvs
119
121
(let ()
139
141
(values (if x-min x-min (apply min* rxs))
140
142
(if x-max x-max (apply max* rxs))
141
143
(if y-min y-min (apply min* rys))
142
- (if y-max y-max (apply max* rys))))
144
+ (if y-max y-max (apply max* rys))))
Original file line number Diff line number Diff line change 31
31
(send area put-arrow (car x) (cdr x) #t ))))
32
32
33
33
34
- (define-type LVof (All (A) (U (Listof A)(Vectorof A))))
34
+ (define-type (LVof A)
35
+ (U (Listof A) (Vectorof A)))
36
+
35
37
(:: arrows3d
36
38
(->* [(U (LVof (LVof Real))
37
39
(LVof (LVof (LVof Real))))]
74
76
'arrows3d
75
77
"(U (Sequenceof (Sequence Real Real Real)) (Sequenceof (Sequence (Sequence Real Real Real) (Sequence Real Real Real)))) "
76
78
vs))
77
-
79
+
78
80
;; check if we have head/tail or pair vectors, and put in standard format
79
81
(define-values (S1 S2)
80
82
(for/fold ([S1 : (Listof (Vectorof Real)) '() ]
135
137
(if y-min y-min (apply min* rys))
136
138
(if y-max y-max (apply max* rys))
137
139
(if z-min z-min (apply min* rzs))
138
- (if z-max z-max (apply max* rzs))))
140
+ (if z-max z-max (apply max* rzs))))
You can’t perform that action at this time.
0 commit comments