Re: Recursion inspection technique : HoldForm but release variables
- To: mathgroup at smc.vnet.net
- Subject: [mg66423] Re: Recursion inspection technique : HoldForm but release variables
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Fri, 12 May 2006 02:02:57 -0400 (EDT)
- Organization: Uni Leipzig
- References: <e3um8v$hfr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, test[j_Integer?Positive] :=test[j] = k[j] f[j - 1] /. f[a_]:>HoldForm[test[a]] Regards Jens "flatmax" <flatmax at gmail.com> schrieb im Newsbeitrag news:e3um8v$hfr$1 at smc.vnet.net... | Hi, | | If I define a recursion and hold its form to inspect it : | Clear[test] | test[j_Integer?Positive] := | test[j] = k[j] HoldForm[ test[j - 1] ] | | then This is what happens : | | In[22]:= test[4] | | Out[22]:= test[4 - 1] k[4] | | But I would like it to be with the variable evaluated : | | Out[22]:= test[3] k[4] | | Whats the trick ??? | | thanks | Matt |