Mark wrote:
> The only exception that I know of is with ?. which pretends to be a 
> rank-0 verb, but actually behaves like a rank-_ verb:
 
Raul responded:
> This is not a rank issue -- it's a state issue. 

The verbs  ?  and  ?.  share the "stateful" aspect, but the former treats each 
atom uniquely, the latter treats each total
argument uniquely.  That is, fixed­-seed is sensitive to the rank of its 
argument (it "sees" arguments of ranks greater than its
advertised rank of zero).

Fixed-seed says it generates the same random number every time it is fed the 
same input, and it says it decomposes inputs of rank
> 0 into arguments of rank 0, these statements cannot both be true and 
> reconciled with the observed behavior:

           ?.  6
        0
           ?.  6     NB.  Aleways gives the same random output for input 6
        0
           ?.  6     NB.  For the first 6, the second 6, and the third six...
        0
           ?.  6 6 6 NB.  Except when they're part of the same array
        0 5 5
           ?. 4 4 $ 6
        0 5 5 4
        2 3 2 1
        4 2 0 2
        1 4 1 2


Conclusion:  despite the dictionary definition, fixed-seed is a verb with 
unbounded rank.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to