Skip to content

Commit

Permalink
add keys for SimpleVector (#26711)
Browse files Browse the repository at this point in the history
  • Loading branch information
RamitPahwa authored and JeffBezanson committed Apr 12, 2018
1 parent 6fe64fe commit e3e5097
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ lastindex(v::SimpleVector) = length(v)
start(v::SimpleVector) = 1
next(v::SimpleVector,i) = (v[i],i+1)
done(v::SimpleVector,i) = (length(v) < i)
keys(v::SimpleVector) = OneTo(length(v))
isempty(v::SimpleVector) = (length(v) == 0)
axes(v::SimpleVector) = (OneTo(length(v)),)
linearindices(v::SimpleVector) = axes(v, 1)
Expand Down

0 comments on commit e3e5097

Please sign in to comment.