This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching  /
Repeated

  • p .. is a pattern object which represents a sequence of one or more expressions, each matching¬†p.
  • p .. can appear as an argument of any function. It represents any sequence of arguments.
  • All the objects in the sequence represented by p .. must match p, but the objects need not be identical.
  • The expression p may, but need not, itself be a pattern object.
  • See the Mathematica book: Section 2.3.11,¬†Section A.2.7.
  • See also: BlankSequence.

    Further Examples

    In[1]:=

    In[2]:=

    Out[2]=

    In[3]:=

    In this case the second elements of all the pairs must be the same.

    In[4]:=

    In[5]:=

    Out[5]=

    In[6]:=

    Out[6]=

    In[7]:=