Message Boards Message Boards

0
|
3178 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Why Is the End Result of Trace Wrapped in HoldForm?

This is probably of no practical importance but my curiosity is aroused. For example, the end result of Trace[2*3+4] is HoldForm[10]

tr = Trace[2*3 + 4]
TreeForm[tr]

enter image description here

POSTED BY: Frank Kampas
4 Replies

Sure, why bother to test if HoldForm is needed or not?

It's like going to the grocery store to buy a bag of chips and the salesclerk puts the bag of chips in a plastic bag.

No thinking required.

POSTED BY: Eric Johnstone

It would display the same if there were no HoldForm on the 10. The same is true of the 6. Note that the HoldForm around the 6 disappears in the next step. Are you saying that every part of Trace is automatically wrapped in HoldForm, whether it is needed or not?

POSTED BY: Frank Kampas
POSTED BY: Eric Johnstone
POSTED BY: Eric Johnstone
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract