PRODUCTS
PURCHASE
FOR USERS
COMPANY
OUR SITES
DOCUMENTATION CENTER SEARCH
Mathematica
>
Evaluation Control
>
Built-in
Mathematica
Symbol
Patterns and Transformation Rules
Evaluation
Evaluation in Patterns, Rules and Definitions
Tutorials »
|
Hold
Verbatim
See Also »
|
Evaluation Control
Patterns
More About »
HoldPattern
HoldPattern
[
expr
]
is equivalent to
expr
for pattern matching, but maintains
expr
in an unevaluated form.
MORE INFORMATION
HoldPattern
has attribute
HoldAll
.
The left-hand sides of rules are usually evaluated, as are parts of the left-hand sides of assignments. You can use
HoldPattern
to stop any part from being evaluated.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Set up a pattern whose left-hand side is kept unevaluated:
In[1]:=
Out[1]=
Use the pattern:
In[2]:=
Out[2]=
Make a definition without the argument of
f
being evaluated:
In[1]:=
SEE ALSO
Hold
Verbatim
TUTORIALS
Patterns and Transformation Rules
Evaluation
Evaluation in Patterns, Rules and Definitions
MORE ABOUT
Evaluation Control
Patterns
New in 3
© 2008 Wolfram Research, Inc.