cancel
Showing results for 
Search instead for 
Did you mean: 

rank question

User
Not applicable
1. Isn't rank of an atom 0, a simple list 1 and "2 3 #til 6" 2. 
2. in x?y the rank of y should be 1 less than x (I call it the rank rule). 
3. I believe I have identified the x and y in the following statement correctly as x being "2 3" and y being "2 3#til6" because the webpage says "If there is no match the result is the count of the left argument" . Hence the output of 2 highlighted proves left side is x and right side is y


q)2 3?2 3#til 6
2 2 0
1 2 2



Given this I have following questions

A. Why is 2 3 claimed to be of 0 rank and (0 1 2;4 5) of 1 rank
B. Isn't the common argument in both expressions (rhs) supposed to be of 1 rank less 


? is rank sensitive; x?y can't deal with mixed rank x. If rank x is n then x?y looks for objects of rank n-1. e.g.

2 3?2 3#til 6  / looks for rank 0 objects(0 1 2;4 5)?2 3#til 6 / looks for rank 1 objects




0 REPLIES 0