> From: Devon McCormick
> 
> I don't know how simplified your example is compared to your real
> problem,
> but any loop in J makes me suspicious.
> 
> Your example, as stated, could be done without looping like this:
> 
>    example=: 3 : '>y$<i.2 3'
>    $example 3
> 3 2 3
> 

I've tried to unlearn a tendency I had earlier to box things when it is not 
necessary.
I would now prefer:
   example=: 3 : 'y # ,: i.2 3'

or tacitly:
   example=: (# ,:)&(i.2 3)

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

Reply via email to