To expand on what Henry said,
   (#~.) y
is equivalent to
   y #~: y
because (f g) for verbs "f" and "g" is dyadic - it re-uses the right
argument on the left side.
Another way to specify that "#" is to be used monadically is
   ([:#~:)

On 1/10/08, Henry Rich <[EMAIL PROTECTED]> wrote:
>
> Because
>
> (#~.) y
>
> is not the same as
>
> # ~. y
>
>
> You need [EMAIL PROTECTED] instead of (#~.)
>
> Alternative form  (~:&# ~.)
>
> Henry Rich
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Yoel Jacobsen
> > Sent: Thursday, January 10, 2008 7:57 AM
> > To: Programming forum
> > Subject: [Jprogramming] Newbie: Tactit question
> >
> > Hello,
> >
> > Why does the following raises a length error:
> > ((#~.) ~: #) 1 2 3 4 1
> >
> > Why isn't it like:
> > (# ~. 1 2 3 4 1) ~: (# 1 2 3 4 1)
> >
> > Goal: to check if there a duplicates in an array..
> >
> >
> > Thanks,
> >    Yoel
> > ----------------------------------------------------------------------
> > 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
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to