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".

                                                        Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to