Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Rules & Patterns > Patterns >

BlankSequence (__)

__ (two _ characters) or BlankSequence[]
is a pattern object that can stand for any sequence of one or more Mathematica expressions.
__h or BlankSequence[h]
can stand for any sequence of one or more expressions, all of which have head h.
A function definition that works with any nonzero number of arguments:
A function definition that works with any nonzero number of real arguments:
A function definition for a symbol followed by any nonzero number of integer arguments:
A function definition that works with any nonzero number of arguments:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
A function definition that works with any nonzero number of real arguments:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
A function definition for a symbol followed by any nonzero number of integer arguments:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team