p.. or Repeated[p]
is a pattern object that represents a sequence of one or more expressions, each matching p.
represents from 1 to max expressions matching p.
represents between min and max expressions matching p.
represents exactly n expressions 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.
Basic Examples (2)
Replace any list of a's by x:
Replace any list of f's with one argument:
Introduced in 1988
Updated in 2007