MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: finding all definitions matching a pattern

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98030] Re: finding all definitions matching a pattern
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 28 Mar 2009 05:43:39 -0500 (EST)

On 3/27/09 at 5:38 AM, rschmied at gmail.com (Roman) wrote:

>Assume we have a number of definitions associated with a symbol F,
>for example:
>F[0] = 3;
>F[1] = 7;
>F[3] = 11;

>What I need is an automated way to generate the list of definitions,
>something like In[1] := getdefs[F] Out[1] = {{0,3},{1,7},{3,11}}

f[0] = 3;
f[1] = 7;
f[3] = 11;

In[4]:= Flatten /@ Apply[List, DownValues[f], 3]

Out[4]= {{0, 3}, {1, 7}, {3, 11}}




  • Prev by Date: rules on vector sequence
  • Next by Date: manipulate, NDSolve, Evaluate
  • Previous by thread: Re: finding all definitions matching a pattern
  • Next by thread: Re: finding all definitions matching a pattern