> I still don't understand why monad  {  produces boxes; perhaps to be
> consistent with its (necessarily) boxed input?  In this case consistency is
> a hindrance; in almost every use I've seen (including this one) we open the
> result of  {  in the end.  

Ken designed the monad { and the dyad { were together, and
if i j k are integer arrays then (<i;j;k){y  is equivalent to  ({i;j;k){y .  
e.g.

   (<1 2;3;4 5){y=: 100+i.3 4 6
146 147
170 171
   ({1 2;3;4 5){y
146 147
170 171



----- Original Message -----
From: Dan Bron <[EMAIL PROTECTED]>
Date: Monday, January 7, 2008 11:59
Subject: Re: [Jprogramming] Fitting factors of positive integers
To: [email protected]

> Raul wrote:
> 
>    fac2a=: */@ >@, @ { @ (<@(1,*/\)/.~) @ q:
> 
> Since the inverse of  q:  is  */  you may 
> reduce  */@[EMAIL PROTECTED]:  to  f&.q:  like
> so:
> 
>    fac2b=:  >@, @ { @ (<@(1,*/\)/.~) &. (q:"1)
> 
> (perhaps the inverse of  q:  should be changed 
> to   */"1  ?)
> 
> I still don't understand why monad  {  produces boxes; 
> perhaps to be
> consistent with its (necessarily) boxed input?  In this 
> case consistency is
> a hindrance; in almost every use I've seen (including this one) 
> we open the
> result of  {  in the end.  
> 
> Moreover, the boxes conflict (in my estimation) with the spirit 
> of J, where
> homogenous rectangular arrays are the norm, and boxes only used 
> for the
> exceptions, where homogeneity and rectangularity is not an 
> option.   But, by
> definition,  >@{  is homogenous and rectangular.
> 
> (Of course I understand that we are now constrained by backwards
> compatibility)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to