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 1999

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

Search the Archive

functions that memorize

  • To: mathgroup at
  • Subject: [mg18402] functions that memorize
  • From: hanssen at
  • Date: Wed, 7 Jul 1999 00:11:03 -0400
  • Sender: owner-wri-mathgroup at

Hi, MathGroup,

for functions, which cost much time to compute, it is handy, to let them memorize, for
which arguments they were already computed. The prototype for doing this is


In a lengthy computation, I want to memorize partial results (of n parameters, n fixed)

I can do this


Now my case is a bit more general, the partial result only depends on the first n
elements of a list "pv". This does not work for n=2 and pv={99,99,...}

     f@@Take[pv,n] = rhs

it complains about  "Set::write: Tag Apply in ab @@ ({99, 99}) is Protected". However,


works. Lateron I can inquire


and get back 3, as expected.  Any idea, how to make the assignment with the
symbols on the left side - I have tried Hold etc without success.

kind regards

Dipl.-Math. Adalbert Hanszen

  • Prev by Date: Re: Re: easiest way to sort a list?
  • Next by Date: Polar coordinates
  • Previous by thread: Re: "At long last, Sir, have you no shame?"
  • Next by thread: Polar coordinates