You need to take a little time out and learn about rank in J. I suggest Chapter 6 of J for C Programmers, but then I would.
I have a little trouble with your terminology, because I'm not sure whether a boxed vector of 3 atoms is < 0 1 2 or 0 ; 1 ; 2 but in either case I don't see why 'each' doesn't work: X =: 0 ; 1 ; 2 y =. <3 X + each y +-+-+-+ |3|4|5| +-+-+-+ X =: <0 1 2 X + each y +-----+ |3 4 5| +-----+ An example of the failure would help. But really, learn about rank. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leigh > J. Halliwell > Sent: Wednesday, August 30, 2006 3:30 PM > To: [email protected] > Subject: [Jprogramming] Question about the "Each" Adverb > > Dear J Forum: > Let func be a dyadic function defined for atoms x and y. If > Y is a boxed > vector of atoms, 'x func each Y' will do the function between > x and each > atom of Y (i.e., one with many). And if X is a boxed vector > of as many > atoms, 'X func Y' will do the function between corresponding > atoms of X and > Y (i.e., many with many). But how can I do the many-to-one > case, 'X func > y'? The adverb "each" doesn't like the left argument. > Sincerely, > Leigh > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
