Index finite lists of positive integers: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: using Test) |
|||
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: |