Index finite lists of positive integers: Difference between revisions
Content added Content deleted
(→{{header|jq}}: Bijective rank/unrank) |
|||
Line 598: | Line 598: | ||
changes would be required if using jaq as jaq does not (as of this writing in 2024) support |
changes would be required if using jaq as jaq does not (as of this writing in 2024) support |
||
the `include` or `module` directives. |
the `include` or `module` directives. |
||
===Fibonacci-based |
===Fibonacci-based encoding=== |
||
<syntaxhighlight lang="jq"> |
<syntaxhighlight lang="jq"> |
||
include "fibonacci" {search: "./"}; # see https://rosettacode.org/wiki/Category:Jq/fibonacci.jq |
include "fibonacci" {search: "./"}; # see https://rosettacode.org/wiki/Category:Jq/fibonacci.jq |
||
Line 665: | Line 665: | ||
} |
} |
||
</pre> |
</pre> |
||
===Bijective encoding=== |
===Bijective encoding=== |
||
<syntaxhighlight lang="jq"> |
<syntaxhighlight lang="jq"> |