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 > Blank (_) >

Blank

or Blank
is a pattern object that can stand for any Mathematica expression.
or Blank[h]
can stand for any expression with head h.
  • The head h in cannot itself contain pattern objects.
A pattern that matches any expression:
A pattern that matches any symbol:
A function definition that will take any single argument:
A function definition for integer arguments only:
A pattern that matches any expression:
In[1]:=
Click for copyable input
Out[1]=
A pattern that matches any symbol:
In[2]:=
Click for copyable input
Out[2]=
 
A function definition that will take any single argument:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
A function definition for integer arguments only:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF