Re: finding all definitions matching a pattern
- To: mathgroup at smc.vnet.net
- Subject: [mg98040] Re: finding all definitions matching a pattern
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sat, 28 Mar 2009 05:45:31 -0500 (EST)
- References: <gqiaar$opg$1@smc.vnet.net>
Hi, F[0] = 3; F[1] = 7; F[3] = 11; and DownValues[F] /. Verbatim[RuleDelayed][Verbatim[HoldPattern][F[a_]], b_] :> {a, b} Regards Jens Roman wrote: > Dear Mathematica user: > > 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}} > > Would you know how to write this function "getdefs"? I am having > trouble extracting any useful information from a call to Definition[F] > since it seems to wrap its output somehow. > > Thanks! > Roman. >