Skip to main content
Post Undeleted by kglr
added 55 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

You can(1) define Evaluaterule1 and rule2 before f, and (2) wrap the rhs of the definition towith Evaluate to suppress the HoldAll attribute of SetDelayed:

f[x_, y_, z_] := Evaluate[(int1 + int2 + int3) /. rule1 /. rule2];
f[1, 2, 3]

14

You can Evaluate the rhs of the definition to suppress the HoldAll attribute of SetDelayed:

f[x_, y_, z_] := Evaluate[(int1 + int2 + int3) /. rule1 /. rule2];
f[1, 2, 3]

14

(1) define rule1 and rule2 before f, and (2) wrap the rhs of the definition with Evaluate to suppress the HoldAll attribute of SetDelayed:

f[x_, y_, z_] := Evaluate[(int1 + int2 + int3) /. rule1 /. rule2];
f[1, 2, 3]

14

Post Deleted by kglr
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

You can Evaluate the rhs of the definition to suppress the HoldAll attribute of SetDelayed:

f[x_, y_, z_] := Evaluate[(int1 + int2 + int3) /. rule1 /. rule2];
f[1, 2, 3]

14