We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
begin
firstindex
1 parent f7c69c8 commit c29240dCopy full SHA for c29240d
base/abstractarray.jl
@@ -362,7 +362,7 @@ julia> first(Bool[], 1)
362
0-element Array{Bool,1}
363
```
364
"""
365
-first(v::AbstractVector, n::Integer) = @inbounds v[firstindex(v):min(firstindex(v) + n - 1, end)]
+first(v::AbstractVector, n::Integer) = @inbounds v[begin:min(begin + n - 1, end)]
366
367
368
last(coll)
@@ -401,7 +401,7 @@ julia> first(Float64[], 1)
401
0-element Array{Float64,1}
402
403
404
-last(v::AbstractArray, n::Integer) = @inbounds v[max(firstindex(v), end - n + 1):end]
+last(v::AbstractArray, n::Integer) = @inbounds v[max(begin, end - n + 1):end]
405
406
407
strides(A)
0 commit comments