Or, to put it another way, equality (=) which compares values is different from equivalence (-:) which accounts for shape as well.
On Wed, Dec 20, 2017 at 12:35 AM, bill lam <[email protected]> wrote: > = is rank 0 > -: is rank infinity > > Try 0= 1$0 and 0-: 1$0 > and note the shape of results > > On Dec 20, 2017 1:16 PM, "Dabrowski, Andrew John" <[email protected]> > wrote: > > > Here's my latest exasperation. > > > > zero =: < (1$0) > > > > zero > > > > ┌─┐ > > > > │0│ > > > > └─┘ > > > > > zero > > > > 0 > > > > $ > zero > > > > 1 > > > > zero = <0 > > > > 0 > > > > (>zero) = 0 > > > > 1 > > > > > > Why in God's name does J consider a singleton list 0 equal to the scalar > > 0 but consider the boxed versions of each distinct? > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA Quantitative Consultant ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
