Skip to content

HoldAllComplete

Status: Experimental

present and registered, but lightly documented and not yet covered by dedicated tests.

Description

HoldAllComplete
    is an attribute which specifies that all arguments to a function are not to be modified or looked at in any way in the process of evaluation.
HoldAllComplete prevents argument evaluation, Sequence flattening inside arguments, Unevaluated wrapper stripping, and application of Evaluate.
Evaluate cannot override HoldAllComplete.

Examples

No verified examples yet for this function.

Implementation notes

HoldAllComplete is an attribute name, not a function. It maps to the bitflag ATTR_HOLDALLCOMPLETE (attr_name_to_flag / get_attributes in src/attr.c); when set on a symbol the evaluator holds all arguments and additionally bypasses Sequence flattening, Unevaluated stripping, and upvalue lookup for that head.

Attributes: none registered.

Implementation status

Experimental — present and registered, but lightly documented and not yet covered by dedicated tests.

References

Notes & additional examples

Worked examples

In[1]:= SetAttributes[h, HoldAllComplete]
Out[1]= Null

In[2]:= h[1+1]
Out[2]= h[1 + 1]

In[3]:= Attributes[h]
Out[3]= {HoldAllComplete}

Notes

HoldAllComplete is the strongest hold attribute: it not only suppresses argument evaluation but also blocks Sequence flattening, Unevaluated stripping, and Evaluate, so the arguments are passed through untouched.