Skip to content

Commit f7173af

Browse files
huangyxistaticfloat
authored andcommitted
Improve first/last docstrings (#39560)
* improve first/last docstrings improve `first`/`last` docstrings to indicate that two new methods have been added since v1.6 (#34868) * Update abstractarray.jl remove the trailing whitespaces (cherry picked from commit bc2b854)
1 parent 78f635f commit f7173af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/abstractarray.jl

+6
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ end
394394
Get the first `n` elements of the iterable collection `itr`, or fewer elements if `v` is not
395395
long enough.
396396
397+
!!! compat "Julia 1.6"
398+
This method requires at least Julia 1.6.
399+
397400
# Examples
398401
```jldoctest
399402
julia> first(["foo", "bar", "qux"], 2)
@@ -439,6 +442,9 @@ last(a) = a[end]
439442
Get the last `n` elements of the iterable collection `itr`, or fewer elements if `v` is not
440443
long enough.
441444
445+
!!! compat "Julia 1.6"
446+
This method requires at least Julia 1.6.
447+
442448
# Examples
443449
```jldoctest
444450
julia> last(["foo", "bar", "qux"], 2)

0 commit comments

Comments
 (0)