FreeQ
FreeQ is like MemberQ in that is also takes a level specification. By default FreeQ looks at all levels, so in the next example FreeQ returns False because it see the 2 in .
Next I tell FreeQ to only look at level 1 and it says there are no Integers.
Next FreeQ returns False because the whole expression matches the pattern (_List).
I don't provide further examples, but any combination of pattern matching constructs can be used with FreeQ. Nuances of pattern matching are discussed in another section.
Heads Option
FreeQ has a Heads option like several other functions, and it has the default setting (Heads→True). So in the next example FreeQ checks the heads of subexpressions and determines that there is one with the head Plus.
In the next example the setting (Heads→False) is used and FreeQ doesn't check the heads of subexpressions.
Created by Mathematica (May 16, 2004)