This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Span (;;)

represents a span of elements i through j.
a span from i to the end.
a span from the beginning to j.
a span that includes all elements.
a span from i through j in steps of k.
from i to the end in steps of k.
from the beginning to j in steps of k.
from the beginning to the end in steps of k.
  • m[[i;;j;;k]] is equivalent to Take[m, {i, j, k}].
  • m[[i;;j]]=v can be used to reset a span of elements in a list or other expression.
  • When used in Part, negative i and j count from the end.
Take a span of elements from a list:
Assign to a span of elements:
Assign a sequence of different elements:
Negative indices count from the end:
New in 6