Is it really applying to a bigger-than-primitive, or is applying to the /. ?

   f=.<
   f/.!.0
+------+--+-+
|+-+--+|!.|0|
||f|/.||  | |
|+-+--+|  | |
+------+--+-+
   <!.0
+-+--+-+
|<|!.|0|
+-+--+-+
   f!.0
|domain error
|       f!.0

It certainly can't apply to the f because !. applies only to primitives.
Besides, the < is being used as monadic. It is /. that does the comparisons.

Never thought about it before, but this is a case where !. applies to a
non-verb. Shouldn't /. be added to the list of primitives to which !.
applies in the Dictionary?

On Sun, Sep 5, 2010 at 11:03 PM, Henry Rich <[email protected]> wrote:

> You just need to get rid of the ~ :
>
> 1 [`]`(0 $~>:@(>./)@])} ia
>
> This is the implementation I would use.  I don't see the need for
> special code, since the old code seems fast enough.
>
>
>
> On your earlier point, !. can be used on bigger-than-primitives:
>
> f/.!.0
>
> is one I use.  It makes sure that intolerant comparison is used on the
> grouping performed by /. .
>
> Henry Rich
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to