Table lookups can return unevaluated; using assigned or comparing against evaln of the indexed name will distinguish between a unevaluated lookup and a found value.
assigned will evaluate the function to determine if it will return itself or not
>
|
f := proc(x) `if`(x::integer,x^2,'procname'(x)) end:
|
If you place an assumption on a name using the assume command, the assigned command returns true for that name.
Note: Evaluating an assigned call under an assumption (using the assuming command), returns true for a name only if it has a value different from its name.