Thanks to everyone for their generous help and advice, particularly in light of the scant description I gave as to what I was aiming at. I think that Joey Tuttle's solution is sufficient to get on with the problem I'm working on.
   inc =: 4 : '(>: x.{y.) x.}y.'
  dec =: 4 : '(<: x.{y.) x.}y.'
It would be interesting (at least for me) to know how one would define this tacitly...

To retrospectively describe what I want to do: use the array of eight numbers as a state-saving device, sort of like an odometer, but freely changable to permit backtracking, and do so with a simple index. Whether this is the best fit to the problem is another question, but I would prefer to work that out myself...after all, that's the fun of programming.

Thanks for the references in Information Theory, which has interested me since my father told me about it as a child.

In fumbling around with this, I discovered that it is indeed possible to define functions within a function definition. If there is a reference to this, I haven't found it. The question is, is this kosher (as it is, say, in Pascal)? This would seem to expand the scope for variables from the official global/ locales/locals schema.
--Nick
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to