Skip to content

Commit

Permalink
Update base/abstractarray.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Zubieta <8410335+pabloferz@users.noreply.github.com>
  • Loading branch information
timholy and pabloferz committed Sep 1, 2020
1 parent 1a6faff commit 9686cf9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2232,13 +2232,7 @@ end
map(f, A::AbstractArray) = collect_similar(A, Generator(f,A))

mapany(f, A::AbstractArray) = map!(f, Vector{Any}(undef, length(A)), A)
function mapany(f, itr)
ret = []
for x in itr
push!(ret, f(x))
end
return ret
end
mapany(f, itr) = Any[f(x) for x in itr]

# default to returning an Array for `map` on general iterators
"""
Expand Down

0 comments on commit 9686cf9

Please sign in to comment.