HoldAllComplete

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.

Details

  • By setting the attribute HoldAllComplete, you can effectively shield the arguments of a function from all aspects of the standard Wolfram Language evaluation process.
  • HoldAllComplete not only prevents arguments from being evaluated, but also prevents Sequence objects from being flattened, Unevaluated wrappers from being stripped, and upvalues associated with arguments from being used.
  • Evaluate cannot be used to override HoldAllComplete.

Examples

open allclose all

Basic Examples  (1)

Properties & Relations  (4)

HoldComplete is a standard container with attribute HoldAllComplete:

No form of evaluation control affects an expression with attribute HoldAllComplete:

Substitution still happens inside an expression with attribute HoldAllComplete:

Unevaluated has the attribute HoldAllComplete:

Possible Issues  (2)

HoldAllComplete affects only evaluation; input transformations are still applied:

HoldAllComplete does not prevent formatting:

Add DisableFormatting to prevent formatting:

Neat Examples  (1)

A fast way to compute the HofstadterConway sequence [more info]:

Introduced in 1996
 (3.0)