@@ -20,7 +20,7 @@ endof(t::Tuple) = length(t)
20
20
size (t:: Tuple , d) = (d == 1 ) ? length (t) : throw (ArgumentError (" invalid tuple dimension $d " ))
21
21
@eval getindex (t:: Tuple , i:: Int ) = getfield (t, i, $ (Expr (:boundscheck )))
22
22
@eval getindex (t:: Tuple , i:: Real ) = getfield (t, convert (Int, i), $ (Expr (:boundscheck )))
23
- getindex (t:: Tuple , r:: AbstractArray{<:Any,1} ) = ([t[ri] for ri in r]. .. )
23
+ getindex (t:: Tuple , r:: AbstractArray{<:Any,1} ) = ([t[ri] for ri in r]. .. , )
24
24
getindex (t:: Tuple , b:: AbstractArray{Bool,1} ) = length (b) == length (t) ? getindex (t, find (b)) : throw (BoundsError (t, b))
25
25
26
26
# returns new tuple; N.B.: becomes no-op if i is out-of-bounds
137
137
function _ntuple (f, n)
138
138
@_noinline_meta
139
139
(n >= 0 ) || throw (ArgumentError (string (" tuple length should be ≥0, got " , n)))
140
- ([f (i) for i = 1 : n]. .. )
140
+ ([f (i) for i = 1 : n]. .. , )
141
141
end
142
142
143
143
# inferrable ntuple (enough for bootstrapping)
@@ -163,7 +163,7 @@ function map(f, t::Any16)
163
163
for i= 1 : n
164
164
A[i] = f (t[i])
165
165
end
166
- (A... )
166
+ (A... , )
167
167
end
168
168
# 2 argument function
169
169
map (f, t:: Tuple{} , s:: Tuple{} ) = ()
@@ -179,7 +179,7 @@ function map(f, t::Any16, s::Any16)
179
179
for i = 1 : n
180
180
A[i] = f (t[i], s[i])
181
181
end
182
- (A... )
182
+ (A... , )
183
183
end
184
184
# n argument function
185
185
heads (ts:: Tuple... ) = map (t -> t[1 ], ts)
@@ -195,7 +195,7 @@ function map(f, t1::Any16, t2::Any16, ts::Any16...)
195
195
for i = 1 : n
196
196
A[i] = f (t1[i], t2[i], map (t -> t[i], ts)... )
197
197
end
198
- (A... )
198
+ (A... , )
199
199
end
200
200
201
201
0 commit comments