I think the more puzzling behavior here isn't that ?. is different from ? but 
that ?. is giving a manifestly incorrect result wrt its definition. Whatever 
rank ?. is, each element of its result should be strictly less than the 
corresponding atom of its argument.  Also an output of _ is just nonsensical, 
no matter what the input.  


I appreciate Raul's comment re the distaste for ?. generally, but I think 
that's more applicable to your observation re rank than REB's re _ , which is a 
bug and should be fixed.

-Dan



Please excuse typos; composed on a handheld device.

-----Original Message-----
From: Mark Niemiec <[email protected]>
Sender: [email protected]
Date: Mon, 8 Aug 2011 07:20:35 
To: J Programming Forum<[email protected]>
Reply-To: Programming forum <[email protected]>
Subject: [Jprogramming] Subject:  monadic rank of roll and deal

"R.E. Boss" <[email protected]> wrote:

>   ? b. 0
>
> 0 0 0
>
>
>
>   ?. b. 0
>
> _ 0 0
>
>
>
> Is this intended?

   ?.10#10
6 5 9 2 4 9 0 7 0 4
   ?."0]10#10
6 6 6 6 6 6 6 6 6 6

Before 6.02, ?. had rank 0, which caused inconsistent behavior,
since "0 should have no effect on a verb that is already rank 0.

It is impossible to write a user-defined verb that emulates the
behavior of ?. without making its rank infinite. As far as I know,
this was the only J primitive that had this kind of behavior.

-- Mark D. Niemiec <[email protected]>
----------------------------------------------------------------------
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