Applying a negative rank twice also causes problems:

   |."_1 i.2 2
1 0
3 2
   |."_1"_1 i.2 2
0 1
2 3

J's implementation does the expected here.

   f =. |."_1
   f"f i.2 2
1 0
3 2

Marshall

On Thu, May 07, 2015 at 09:09:08PM +0000, 'Pascal Jasmin' via Programming wrote:
> is there a reason to call
> 
>   (+" 0 _1) b. 0 
> _ 0 _
> 
> a feature?
> 
> why should it not be
> 
> _ 0 _1
> 
> ?
> 
> 
> 
> ----- Original Message -----
> From: Marc Simpson <[email protected]>
> To: Programming forum <[email protected]>
> Cc: 
> Sent: Thursday, May 7, 2015 4:33 PM
> Subject: Re: [Jprogramming] Puzzle: nontransitive rank
> 
> Or indeed
> 
>    enigma=. +"0 _1
> 
> 
> On Thu, May 7, 2015 at 9:30 PM, Marc Simpson <[email protected]> wrote:
> 
> >    enigma=. +"_1 0 _1
> >    1 2 enigma 1 2
> > 2 4
> >    1 2 enigma"enigma 1 2
> > 2 3
> > 3 4
> >
> > On Thu, May 7, 2015 at 9:19 PM, 'Pascal Jasmin' via Programming <
> > [email protected]> wrote:
> >
> >> cool puzzle that seems unsolvable given
> >> http://www.jsoftware.com/help/dictionary/d600xv.htm
> >>
> >> the property of enigma is that when operated at its "native rank" it
> >> returns the first result, but
> >>
> >> enigma"enigma applies enigma at enigma's rank, and so how could this be
> >> different?
> >>
> >>
> >> ----- Original Message -----
> >> From: Henry Rich <[email protected]>
> >> To: Programming forum <[email protected]>
> >> Cc:
> >> Sent: Thursday, May 7, 2015 3:25 PM
> >> Subject: [Jprogramming] Puzzle: nontransitive rank
> >>
> >>     1 2 enigma 1 2
> >> 2 4
> >>     1 2 enigma"enigma 1 2
> >> 2 3
> >> 3 4
> >>
> >> enigma is a short verb.  What might it be?
> >>
> >> Henry Rich
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to