If I create a custom function and want to make it Listable, is the function restricted to one argument, namely, the input list? For example, here’s a function that computes the square root of a number or list of numbers.
Actually, looking at your example again, that might not be what you want. What Listable does is cause your function to be automatically threaded over Lists. Your code actually worked. What you ended up with for mySqrt[{4, 9}, "Table"] was this: List[TableForm[2], TableForm[3]]. It’s just that for atomic values, TableForm doesn’t have a noticeable effect on the appearance.
So, are you wanting a special definition for lists, or are you really wanting to make your function Listable?
mySqrt[{4,9},“Table”] still returns {2,3}, not a table. Any way to pull off what I am trying to do?
It actually does not return {2,3} but
{TableForm[2], TableForm[3]}
because it threaded over the first argument before calling TableForm. Personally I avoid the Listable attribute except for dead-simple numeric functions. For anything else just make a definition that uses Map appropriately, as discussed here.