earlier in the thread, the example of  -/1 2 3 4 5  was given as a
demo of APL's evaluation order.  2 choices were identified - the APL
way:
  (((1 - 2) + 3) - 4) + 5
and the common calculator way:
  1 - (2 + 3 + 4 + 5)

in left to right, i would express these choices as:
  1 2 3 4 5 /-`+
and
  1 2 3 4 5 /-

but in j,
  -/1 2 3 4 5
and
  ({.-+/@}.)1 2 3 4 5    NB. thanks, raul

doesn't this demonstrate that left to right has an advantage in
brevity (at least in this example)?


ta, jack
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to