Index finite lists of positive integers: Difference between revisions

Content added Content deleted
Line 174: Line 174:
=== Bijective ===
=== Bijective ===


Using the method of the Python version:
Using the method of the Python version (shifted):


<lang j> rank=. 1 -~ #.@:(1 , >@:(([ , 0 , ])&.>/)@:(<@:($&1)"0))@:x:
<lang j> rank=. 1 -~ #.@:(1 , >@:(([ , 0 , ])&.>/)@:(<@:($&1)"0))@:x: