Sort a list of object identifiers: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (added Arturo) |
|||
Line 688: | Line 688: | ||
end zipWith</syntaxhighlight> |
end zipWith</syntaxhighlight> |
||
{{Out}} |
{{Out}} |
||
<pre>1.3.6.1.4.1.11.2.17.5.2.0.79 |
|||
1.3.6.1.4.1.11.2.17.19.3.4.0.1 |
|||
1.3.6.1.4.1.11.2.17.19.3.4.0.4 |
|||
1.3.6.1.4.1.11.2.17.19.3.4.0.10 |
|||
1.3.6.1.4.1.11150.3.4.0 |
|||
1.3.6.1.4.1.11150.3.4.0.1</pre> |
|||
=={{header|Arturo}}== |
|||
<syntaxhighlight lang="arturo">lst: [ |
|||
"1.3.6.1.4.1.11.2.17.19.3.4.0.10" |
|||
"1.3.6.1.4.1.11.2.17.5.2.0.79" |
|||
"1.3.6.1.4.1.11.2.17.19.3.4.0.4" |
|||
"1.3.6.1.4.1.11150.3.4.0.1" |
|||
"1.3.6.1.4.1.11.2.17.19.3.4.0.1" |
|||
"1.3.6.1.4.1.11150.3.4.0" |
|||
] |
|||
print.lines arrange lst 'x -> |
|||
sum map.with:'i to [:integer] split.by:"." x 'z -> |
|||
z * 10^(20-i)</syntaxhighlight> |
|||
{{out}} |
|||
<pre>1.3.6.1.4.1.11.2.17.5.2.0.79 |
<pre>1.3.6.1.4.1.11.2.17.5.2.0.79 |
||
1.3.6.1.4.1.11.2.17.19.3.4.0.1 |
1.3.6.1.4.1.11.2.17.19.3.4.0.1 |