!. doesn't apply to to /., but to the verb f/., whatever f may be.

Yes, it affects only the operation of the /. part of f/. .

It is not unthinkable for !. to apply to named verbs.  I have often 
wished that

v!.value

would define a local name, say f, before v starts execution.

Henry Rich

On 9/6/2010 7:16 AM, Don Guinn wrote:
> 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to