MathGroup Archive 2002

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

Search the Archive

Reducing a function to one argument

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36155] Reducing a function to one argument
  • From: Bob Harris <nitlion at mindspring.com>
  • Date: Fri, 23 Aug 2002 21:34:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Howdy,

I'm trying to figure out the correct syntax to do the following.  I have
some function with three arguments, and I want to syntactically describe the
single-argument function that holds two of those arguments constant (i.e.
without creating that single-argument function).

More specifically, I have defined

    Machine[radix_,multiplier_,state_] := Module [{c,s},
        c = Floor[state/base]; s = Mod[state,base];
        multiplier*s + c
        ]

where I have a generalize 'machine', defined by the radix and multiplier,
which converts one state into another state.  So I'd like to be able to do
something like this:

    NestList[Machine[10,7,#], 3, 22]

to get the series of states that the radix-10 multiplier-7 machine runs
through (starting with state 3).  However, this syntax doesn't seem to do
what I want.

I hope that description makes sense.  It seems like there must be a syntax
to describe the function Machine[10,7,#].

Anyone have any ideas?

Thanks,
Bob H



  • Prev by Date: Re: Mathematica 4.2: Problem with online help.
  • Next by Date: a question about pattern replacements
  • Previous by thread: Re: Applying NumberForm to tick mark labels
  • Next by thread: Re: Reducing a function to one argument