On Sun, 17 Dec 2006, Henry Rich wrote:

> You could put an extra character like 'x' at the beginning of each
> line and then remove it with
>
> n =: ; <@}.;.2 (0 : 0)
> x)
> etc.
> )
>
> Henry Rich

For what it's worth, if anyone wants a verb to do this, then
    #~ _1 -.@|. =&LF
is slightly larger but slightly quicker than
    [: ; <@:}.;.2
though perhaps the  LF  for end of line could be system-dependent.
Henry's takes no time at all, the one I've used takes about
40% of no time at all :-)   Thus:

NB. ===== begin J example =====
NB.

rmcol0=: #~ _1 -.@|. =&LF

text=: rmcol0 0 : 0
#((
#abc
#defg
#)
#lmn
#)
)

J.E.H.Shaw   [Ewart Shaw]      [EMAIL PROTECTED]    TEL: +44 2476 523069
  Department of Statistics,  University of Warwick,  Coventry CV4 7AL,  UK
  http://www.warwick.ac.uk/statsdept            http://www.ewartshaw.co.uk
(-: |.)@-.&' ,.'  'I LOVE ME, VOL. I'   NB. forthcoming autobiography?

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

Reply via email to