Well here is a partial sort of solution. I was trying to
reproduce an example that used a function integerdigits
which produced an error when given a symbol as an
argument. I changed integerdigits to use the simplifier,
modeled after Robert's log10 function, so that a symbolic
argument is legal. This works. Of course this just makes
integerdigits behave better, and doesn't solve the problem
in general. That problem is how to call create_list from
inside a function using data passed to that function.
So here is a useless table of the digits of the numbers
between 16 and 18 in 4 different bases.
(%i12) table(integerdigits(x,y,5),[x,16,18],[y, [2,8,10,16]]);
(%o12) [[[1,0,0,0,0],[0,0,0,2,0],[0,0,0,1,6],[0,0,0,1,0]],
[[1,0,0,0,1],[0,0,0,2,1],[0,0,0,1,7],[0,0,0,1,1]],
[[1,0,0,1,0],[0,0,0,2,2],[0,0,0,1,8],[0,0,0,1,2]]]
That brings up another question. integerdigits threads over
two of its arguments (a feature not used above). I had
originally put this code in the function itself. I moved
that functionality to simplifier rules. It seems cleaner and
easier to change. I guess using the simplifier for things
like threading over a list is the preferred way.
Thanks,
John