Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: memoizing function again

  • To: mathgroup at
  • Subject: [mg32619] Re: memoizing function again
  • From: Paul Abbott <paul at>
  • Date: Thu, 31 Jan 2002 01:46:06 -0500 (EST)
  • Organization: University of Western Australia
  • References: <a2lkn5$htb$> <a2ong2$5uo$>
  • Sender: owner-wri-mathgroup at

In article <a2ong2$5uo$1 at>, kuska at 

> ClearConstantArg[f_Symbol] := 
>   DownValues[f] = 
>     DownValues[f] /. (Verbatim[HoldPattern][f[_Integer]] :> _) :>
> Sequence[]
> will do it. For what do wish to use Cases[] ?

Because Cases (or DeleteCases) is (slightly) more elegant?

   ClearConstantArg[f_Symbol] := 
      DownValues[f] = DeleteCases[DownValues[f], 
         Verbatim[HoldPattern][f[_Integer]] :> _]


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

            God IS a weakly left-handed dice player

  • Prev by Date: Re: Re: Simulating Correlated non-Normal Random Variables
  • Next by Date: Re: Keeping order with Union
  • Previous by thread: RE: RE: memoizing function again
  • Next by thread: Mathematica for Linux font problem on SuSE7.3