Assume that definitions like the following are in place:
f[alpha] = "artichoke";
f[bravo] = "beet";
f[charlie] = "celery";
...
f[yankee] = "yam";
f[zulu] = "zucchini";
etc. (Also assume that all the symbols alpha, bravo, charlie, ..., yankee, zulu evaluate to themselves.)
I'm looking for a way to get a list of all the symbols for which f is defined. IOW, given f, I'm looking for a way to get the list of symbols
{alpha, bravo, charlie, ..., yankee, zulu}
(Note that, for the query I'm interested in here, the values associated with the definitions are irrelevant.)
The closest I've found is to somehow scrape the output of Information[f] (or Definition[f]), which strikes me as a horrible prospect.
Is there a more civilized approach?
First[#][[1, 1]] & /@ DownValues[f]. – Virgil May 01 '15 at 05:08Level[DownValues[f], {4}]. – Virgil May 01 '15 at 05:19