Re: finding all definitions matching a pattern
- To: mathgroup at smc.vnet.net
- Subject: [mg98012] Re: finding all definitions matching a pattern
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Sat, 28 Mar 2009 05:40:20 -0500 (EST)
- References: <gqiaar$opg$1@smc.vnet.net>
The function is called DownValues[]. In[4]:= DownValues[F] Out[4]= {HoldPattern[F[0]] :> 3, HoldPattern[F[3]] :> 11, HoldPattern[F[7]] :> 7} Not exactly the form you were looking for, but you can parse the output pretty easily In[11]:= Cases[DownValues[F], RuleDelayed[_[F[x_]], y_] :> {x, y}] Out[11]= {{0, 3}, {3, 11}, {7, 7}} Daniel