> It does save a pair of '()' but that seems to be not a good
> practice as it
> doesn't use the 'primary' functionality of '>' which is to unbox
Who's to say what the "primary functionality" of
something is? I have on occasion used the monad
":&.> to produced formatted numbers individually boxed:
":&.> 0 1 1 2 3 5 8 13
+-+-+-+-+-+-+-+--+
|0|1|1|2|3|5|8|13|
+-+-+-+-+-+-+-+--+
where > is used to effect box (rather than unbox),
among other effects. Other examples:
; i.&.> 4 5 2
0 1 2 3 0 1 2 3 4 0 1
; 4 5 2 {.&.> 1
1 0 0 0 1 0 0 0 0 1 0
----- Original Message -----
From: gary ng <[email protected]>
Date: Wednesday, May 13, 2009 19:11
Subject: Re: [Jprogramming] Newbie question about {.&>
To: Programming forum <[email protected]>
> On Wed, May 13, 2009 at 6:53 PM, bill lam
> <[email protected]> wrote:
>
> > On Wed, 13 May 2009, gary ng wrote:
> > > Are there any hidden 'gem' or reason to say '{.&>' rather
> than '({."0)'
> > as
> > > to me the only reason for the &> is to modify the rank of {. ?
> >
> > If the argument is un-boxed, why would you use {.&> ?
> What effect did
> > you expect from that > ?
> >
>
> That is what puzzled me. This is the original code I came across :
>
> (,|....@}:)(,.|....@}:"1)({.&>~#{.i:@#)(65}.a.)(>:@i.{.[)'E'
>
> from http://www.craigmurphy.com/blog/?p=1417#comment-66863
>
> It does save a pair of '()' but that seems to be not a good
> practice as it
> doesn't use the 'primary' functionality of '>' which is to unbox
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm