1
$\begingroup$

If I define a function over certain values:

f[0] = 1
f[1] = 2
f[2] = 3

How do I get the list of parameter values that it's been defined on?

ie. FunctionValues[f]
{0,1,2}
$\endgroup$

closed as off-topic by MarcoB, m_goldberg, user9660, Kuba, dr.blochwave May 11 '16 at 7:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, m_goldberg, Community, Kuba, dr.blochwave
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    $\begingroup$ DownValues[f][[All, 1, 1, 1]]. $\endgroup$ – Leonid Shifrin May 7 '16 at 2:24