map=: 3 : 0
(9!:6 '') map y
:
b=. (i.->./t) </ t=. +/\ (=/\''''~:y) * 1 _1 0 {~ '()' i. y
y , (2 #.\"(1) 0,.b) { ' ',6 8 10{x
)
f=: [: (#~ (0 ~: 1&{"1))@; <@(0&{ ,. 1&{ ([EMAIL PROTECTED] ,. (] +//. ["0) ,.
[ * [EMAIL PROTECTED]) 2&}.)"1
map 5!:5 <'f'
[: (#~ (0 ~: 1&{"1))@; <@(0&{ ,. 1&{ ([EMAIL PROTECTED] ,. (] +//. ["0) ,. [ *
[EMAIL PROTECTED]) 2&}.)"1
└──────────┘
└──────────┘ └───────────────────────────────┘
└───────────────┘ └─────────────────────────────────────────────────┘
map ' ~:/\ @ (''())))'' = ])'
~:/\ @ ('())))' = ])
└───────────┘
map 5!:5 <'assert'
0 0"_ $ 13!:8^:((0: e. ])`(12"_))
└───────┘ └────┘
└────────────────┘
map 5!:6 <'assert'
(0 0"_) $ ((13!:8)^:(((0:) e. ])`(12"_)))
└──┘
└─────────┘ └────┘
└─────┘ └──────────────────┘
└─────┘ └─────────────────────────────┘
----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Wednesday, July 30, 2008 9:32
Subject: Re: [Jgeneral] tracing tacit definition execution
To: General forum <[email protected]>
> 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 * ~:/\@:=&'''')
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm