For swapping items, x A. y has a high "gee whiz" factor, but (<i,j)C. y is more practical. For example, to swap last two items, one could say 1&A. or (<_1 _2)&C. . To swap the first two items, (<0 1)&C. does it. To do it using A. is less straightforward.
----- Original Message ----- From: greg heil <[EMAIL PROTECTED]> Date: Thursday, July 13, 2006 9:47 am Subject: Re: [Jprogramming] special coding for stack operations > The first half dozen A.'s would be useful if they could be done > "in place". > Here are the Forth Stack ops for inspiration: > http://www.ugcs.caltech.edu/manuals/lang/gforth-0.6.2/Data-stack.html > The two-* stuff is mostly to accomodate double words and thus not > really relevant. > > i suppose some of this might profitably be done with memory mapped > semantics too. > > ~greg > ------------------------------------------------------------------- > --- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
