Having access to the previous evaluation either through a built in noun (like x y u v inside functions), or a slightly less convenient monad has a few benefits.
1. In interactive mode, a very convenient way of exploring... making sure intermediate results are as expected. -- if this is the only recognized benefit, then a console shortcut to paste last expression at cursor is probably more useful. 2. A readability assist in scripts, where some people may prefer the organizational chunking of separate lines or simplify any logical discomforts in the right to left parsing. 3. J's attempt to be the 1 language to rule them all ignores any embracing and extending of stack based languages (Forth). I'm not particularly familiar with these, but if a monad solution is adopted, [. 1 -- previous evaluation [. 2 -- line before that [. 1 2 -- boxed pair of last 2 evaluations? [. 0 -- some kind of self reference, i'm unsure is needed... and if not, could refer to previous line, and simplify the simplest multiresult uses. 4. It can be used following a control structure to pick up whatever happened to be the last executed evaluation... essentially being another control structure itself. +/ % # ([. 0) 1 3 5 NB. =3... use last evaluation with parameters __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
