Jump to content

Sort a list of object identifiers: Difference between revisions

m
No edit summary
Line 211:
Factor provides the <code>human<=></code> word which converts numbers in a string to integers before comparing them.
<lang factor>USING: io qw sequences sorting sorting.human ;
IN: rosetta-code.sort-object-ids
 
qw{
CONSTANT: input qw{
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
Line 220 ⟶ 219:
1.3.6.1.4.1.11.2.17.19.3.4.0.1
1.3.6.1.4.1.11150.3.4.0
input} [ human<=> ] sort [ print ] each</lang>
}
 
input [ human<=> ] sort [ print ] each</lang>
{{out}}
<pre>
1,827

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.