Hello Raul;
If you define:
t =: monad : 0 NB. Yes, it could be tacit.
'X Y' =. y
if. 0=$Y do.
y
else.
(X,{:Y);}:Y
end.
)
You can get the result using the same method outlined in the benchmarks:
0 {::(t^:_) 1 2 3;1 2 3 4 5
1 2 3 5 4 3 2 1
And timings could be done.
Raul Miller wrote:
On Dec 5, 2007 3:43 PM, Viktor Cerovski <[EMAIL PROTECTED]> wrote:
Anyhow, one part of the test says: "remove each individual item
from right side of L3 and append to right side of L2 (reversing list)".
Since this is the j programming forum, I am going to guess that this
means
L2,|.L3
Though maybe it really means
L2=: L2,|.L3
L3=:''
(To me, these are very different operations, but not a very interesting
benchmark.)
--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er |
-----------------------------------------------------(INTP)----{ gnat }-
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm