> From: Martin Neitzel > > RS> or tacitly: > RS> example=: (# ,:)&(i.2 3) > > Why that hook? You can simply write > > example =: #&(,: i. 2 3) > > In case you wonder: in both lines, the parenthesized part on the > right will be computed into a simple noun at definition time. > Don't let that "i." confuse you when you ask J about "example": > > example > #&(i.1 2 3) > > This is just J's way of displaying a 2-row constant with a substitute > expression keeping things on a single line. There's no i.ing going on > when you invoke "example". >
Thanks Martin, I wasn't confused about that point. I use both linear and boxed notations which help on that point. example #&(i.1 2 3) +-+-+-----+ |#|&|0 1 2| | | |3 4 5| +-+-+-----+ I just took the idiom (# ,:) (give me x copies of y) and gave it a right argument. You're right that it can be simplified further. Ric ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
