There is more than one way to do things in Mathematica. A simple example code
build[a_buildExpr[a_, b_, x_]v_] := a + b x;v;
ClearAll[x]; (* clears values associated with 'x' *)
exprList = Table[build[aTable[buildExpr[a, b, x], {a, 3}, {b, 3}];
exprFunc[a_, b_, v_] := Block[{x = v}, exprList[[a, b]]];
exprFunc[1, 2, u] == 1 + 2 u
returns True
. The initial problem you encountered was the Evaluate[exprList[[a, b]]]
which was being evaluated in defining the exprFunc
but a
and b
were not defined yet. You want to avoid using Evaluate
and use Block
instead to give a local value of the variable x
which will be used by the expressions in exprList
. The documentation for Evaluate
shows that it is only needed for some special cases to override Holds.