preprocessTablefun function

Pre-process tablefun argument.