MathGroup Archive 2001

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

Search the Archive

Question involving scope/recursion/arguments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27642] Question involving scope/recursion/arguments
  • From: "John Eric Hanson" <jhanson1 at stny.rr.com>
  • Date: Fri, 9 Mar 2001 02:35:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello all-

Having a bit of difficulty here.  In general terms, the problem is this:

I would like to have a function f that takes a list (among other things) as
an argument.  I would then like to make some adjustments to the list and
then call f again (from inside the first f), and so on until the list
satisfies a certain criteria.  The general template would look something
like this:

f[list_,a_,b_] := (g[list], If[r, f[list_,c,d], STOP])

I can accomplish my intended task using a global variable for list (or
assigning list to a global), but I haven't succeded yet to maintain the
values when I simply want to recursively make adjustments to list without
introducing a copy of it (or fixing the function to a specific variable).

Any hints would be appreciated.

Thanks much,

Eric





  • Prev by Date: Re: Integrate[1+f[x],x]
  • Next by Date: Letting integers be integers (when using //N)
  • Previous by thread: Re: Simple integration that Mathematica can't do?
  • Next by thread: Re: Question involving scope/recursion/arguments