Skip to content

Commit

Permalink
Add Colon to stdlib; touch up its doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauman committed Jan 12, 2017
1 parent 748fd0e commit 1b2b738
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ function isassigned(v::SimpleVector, i::Int)
return x != C_NULL
end

# index colon
"""
Colon()
Colons (:) are used to signify indexing entire objects or dimensions at once.
Very few operations are defined on Colons directly; instead they are converted
to `Slice`s upon indexing (within `to_indices`).
by `to_indices` to an internal vector type (`Base.Slice`) to represent the
collection of indices they span before being used.
"""
immutable Colon
end
Expand Down
1 change: 1 addition & 0 deletions doc/src/stdlib/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Base.getindex(::AbstractArray, ::Any...)
Base.view
Base.@view
Base.to_indices
Base.Colon
Base.parent
Base.parentindexes
Base.slicedim
Expand Down

0 comments on commit 1b2b738

Please sign in to comment.