An alternative is to use indexing:

   copy1=: ([ (* $ [EMAIL PROTECTED]) {:@[EMAIL PROTECTED]) {"1 ]
   1000 (copy -: copy1) b
1



----- Original Message ----- 
From: "June Kim" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Saturday, March 18, 2006 8:32 AM
Subject: [Jprogramming] Different(and maybe more elegant) ways of copying?

   b=. 2 2 $'abcd'
   copy=.13 : ',./ > x $< y '   NB. copies the box side by side
   3 copy b
ababab
cdcdcd
   4 copy b
abababab
cdcdcdcd

Maybe, I could use under(as in  13 : ',./ (x&$)&.< y') but the final
form isn't tacit, which is not a big problem; however I'm interested
in knowing other possibilities.

Any suggestions?


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

Reply via email to