Index finite lists of positive integers: Difference between revisions

Line 666:
}
</pre>
 
'''Stretch task'''
For the integers from 1 to 10 inclusive, the "unranked" values are shown by the following output, in which the third value on each line confirms the round-trip via "rank":
<pre>
[1,[0],1]
[2,[1],2]
[3,[0,0],3]
[4,[2],4]
[5,[1,0],5]
[6,[0,1],6]
[7,[0,0,0],7]
[8,[3],8]
[9,[2,0],9]
[10,[1,1],10]
</pre>
See the `task` function in the following subsection for details.
 
===Bijective map based on "n 1s" encoding===
2,455

edits