e=: '+/(x,t),(t=. y),x'
   2 (13 :e, 4 :e) 3
10 10
NB. but
   e=: '+/(x,t),(t=. y),1,x'
   2 (13 :e, 4 :e) 3
10 11
NB. and, more illuminating:
   e=: '|.(x,t),(t=. y),1,x'
   2 (13 :e; 4 :e) 3
+-------+---------+
|2 3 3 2|2 1 3 3 2|
+-------+---------+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to