You did not correctly transfer the defn of map from the
J Forum msg to your J session.  To avoid wrap-around 
and other problems, get the defn from the J Forum archive:

http://www.jsoftware.com/pipermail/general/2008-July/032128.html



----- Original Message -----
From: Tom Arneson <[EMAIL PROTECTED]>
Date: Wednesday, July 30, 2008 11:42
Subject: RE: [Jgeneral] tracing tacit definition execution
To: 'General forum' <[email protected]>

> I get an error:
> 
>       map 5!:5 <'f'
> |value error: b
> |   b=.(i.->./t)</t=.+/\(=/\''''~:y)*1 _1 
> 0{~'()'i.y y,    (2#.\"(1)0,.b){'
> ',6 8 10{x
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:general-
> [EMAIL PROTECTED] Behalf Of Roger Hui
> Sent: Wednesday, July 30, 2008 13:24
> To: General forum
> Subject: Re: [Jgeneral] tracing tacit definition execution
> 
> 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
>                                               L-----------
> 
>        L-----------
>                   L--------------------------------
> 
>    L----------------     L---------
> -----------------------------------------
> 
> 
>    map ' ~:/\ @ (''())))'' = ])'
>  ~:/\ @ ('())))' = ])
>         L------------
> 
>    map 5!:5 <'assert'
> 0 0"_ $ 13!:8^:((0: e. ])`(12"_))
>                 L-------- L----- 
>                L-----------------
>    map 5!:6 <'assert'
> (0 0"_) $ ((13!:8)^:(((0:) e. ])`(12"_)))
>                       L---               
>                      L---------- L-----  
>            L---
> ---  L------------------- 
> L------   L------------------------------
> 
> 
> 
> ----- 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
> >     
> > L--------
>                       L-
> > 
> > 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

Reply via email to