A very simple but perplexing result from Mathematica

GROUPS:
 When I execute the following, the result is obvious and expected: f [ Graphics@Circle[ ] ] But when I execute the following, I should obtain the same result but instead get an error: {Graphics@Circle[ ] } /. List -> f This is the root of some serious difficulties I am having in more complicated situations.
Answer
3 years ago
2 Replies
 David Reiss 3 Votes Exploring this using InputForm one discovers that Circle[] evaluates to Circle[{0, 0}] so, when you do the List->f replacement this becomes Circle[f[0, 0]] however, the first argument of Circle must be a coordinate list pair. Hence, the error message. If f[0,0] were to evaluate to a coordinate list pair then presumably the error would not occur.
Answer
3 years ago
 Thank you very much. I forgot my rule could mess things up deep within the expression to which it is applied.
Answer
3 years ago