Background
Suppose I have begun a fresh kernel session, and I have defined the following function alone:
F[x_, y_] := x + y;
One expected use of F
is this:
F[0, 1]
Consider three examples of unexpected uses. One with the wrong name, one with an incorrect number of arguments, and a final one with an expected application of +
to an unexpected application of F
and 1
.
G[0, 1]
F[0]
F[0] + 1
All of these are valid Mathematica expressions, however I am not interested in them in this context.
Question
How can I ensure that an expressions contains no unevaluated function applications?
- Is there a function which takes an expression and asserts this requirement?
- Is there a function which asserts this over all following expressions in the context?