x=: i.10 2 3 y=: i.4 5 2 4 x -. y |length error | x -.y After the change, x -. y would be just x itself.
The dictionary defines the dyad -. thus: x-.y includes all items of x except for those that are cells of y . The dyad i. is used to determine "except for those that are cells of y". ----- Original Message ----- From: bill lam <[EMAIL PROTECTED]> Date: Tuesday, May 15, 2007 5:37 pm Subject: Re: [Jgeneral] length error in i. > In what way will be the proposed change affect dyad -. ? > > Roger Hui wrote: > > Currently, x i. y signals length error when the > > rank r cells of y do not have the same shape as the > > the rank r cells of x, where r=:0>.(#$x)-1 is the > > rank of an item of x . For example: > > > > x=: i.10 2 3 > > y=: i.4 5 2 4 > > x i. y > > |length error > > | x i.y > > > > I propose to change this to return #x for each > > rank r cell. Thus: > > > > x i. y > > 10 10 10 10 10 > > 10 10 10 10 10 > > 10 10 10 10 10 > > 10 10 10 10 10 > > > > One jusification for this change is that x i. y > > already returns #x for cells having a wrong type, > > a situation no less egregious than having a wrong > > shape. > > > > x i. 4 2 3$'deipnosophist' > > 10 10 10 10 > > > > i: e. -. will also be changed correspondingly. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
