Maybe something like this (making up my own verbs)?
verbnum=: 13 : '":*:>{:y'
verbstr=: 13 : '''Pennsylvania '',>{:y'
doit=: verbnum`verbstr @. ((' ' = [: {. 0 $ [: > {:))"1
]toit=: ('ho';40),:99;'Ave.'
+--+----+
|ho|40 |
+--+----+
|99|Ave.|
+--+----+
doit toit
1600
Pennsylvania Ave.
The results of the two verbs have to be compatible since they'll be joined.
To check the type, I avoided "3!:0" and used the old idiom of comparing
space to the overtake of the zero reshape of the item to typecheck.
Using "3!:0" might look like this:
doit=: verbnum`verbstr @. (2=[:3!:0[:>{:)"1
On 9/21/07, bill lam <[EMAIL PROTECTED]> wrote:
>
> Can you give a more concrete example and the expected output?
>
> Martin Pelletier wrote:
> > Hello,
> >
> > I humbly request some help on this. I have 2 verbs to which I want to
> > pipe arguments of different types. Let's say verbstr and verbnum.
> >
> > I want to use agenda to apply the correct verb.
> >
> > This is the variable going into the entire gimmick:
> >
> > var =. (10;20;'foo'),:10;20;0
> >
> > The type to determine is in the last item (of each row)
> >
> > I would have thought the following would work:
> >
> > [EMAIL PROTECTED](2&= 3!:0&>{:)"1 var
> >
> > but I'm obviously missing something and can't figure out how to apply
> > rank in this case.
> >
> > Thanks for the help,
> >
> > Martin
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
> --
> regards,
> bill
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm