diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 4326b999a6930..a0e0f882a4f30 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -394,6 +394,9 @@ end Get the first `n` elements of the iterable collection `itr`, or fewer elements if `v` is not long enough. +!!! compat "Julia 1.6" + This method requires at least Julia 1.6. + # Examples ```jldoctest julia> first(["foo", "bar", "qux"], 2) @@ -439,6 +442,9 @@ last(a) = a[end] Get the last `n` elements of the iterable collection `itr`, or fewer elements if `v` is not long enough. +!!! compat "Julia 1.6" + This method requires at least Julia 1.6. + # Examples ```jldoctest julia> last(["foo", "bar", "qux"], 2)