On 7/30/08, Roger Hui <[EMAIL PROTECTED]> wrote:
> map=: 3 : 0
>  (9!:6 '') map y
> :
>  b=. (i.->./t) </ t=. +/\1 _1 0 {~ '()' i. y
>  y , (2 #.\"(1) 0,.b) { ' ',6 8 10{x
> )

This is very nice, however:
   map 'b=. (i.->./t) </ t=. +/\1 _1 0 {~ ''()'' i. y'
b=. (i.->./t) </ t=. +/\1 _1 0 {~ '()' i. y
    └───────┘                      └┘

And parenthesis within quotes can be unbalanced and
can appear between balanced parenthesis.

Quoted parenthesis could be eliminated by replacing '()' i. with
something like ('()'&i. >. 2 * ~:/\@:=&'''')

FYI,

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

Reply via email to