Skip to content

Commit 8d3ec32

Browse files
Chris Fosterandyferris
authored andcommitted
Minor cleanups
1 parent 16fa766 commit 8d3ec32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mapreduce.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
@inline _first(a1, as...) = a1
2+
13
################
24
## map / map! ##
35
################
46

7+
# The following type signature for map() matches any list of AbstractArrays,
8+
# provided at least one is a static array.
59
@inline function map(f, as::Union{SA,AbstractArray}...) where {SA<:StaticArray}
610
_map(f, same_size(as...), as...)
711
end
@@ -16,7 +20,7 @@ end
1620
newT = :(Core.Inference.return_type(f, Tuple{$(eltypes...)}))
1721
return quote
1822
@_inline_meta
19-
@inbounds return similar_type(typeof(_first_static(a...)), $newT, Size(S))(tuple($(exprs...)))
23+
@inbounds return similar_type(typeof(_first(a...)), $newT, Size(S))(tuple($(exprs...)))
2024
end
2125
end
2226

0 commit comments

Comments
 (0)