Order two numerical lists: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: removed STYLE from PRE html tag.)
(added swift)
Line 958: Line 958:
<lang sml>- List.collate Int.compare ([1,2,1,3,2], [1,2,0,4,4,0,0,0]) = LESS;
<lang sml>- List.collate Int.compare ([1,2,1,3,2], [1,2,0,4,4,0,0,0]) = LESS;
val it = false : bool</lang>
val it = false : bool</lang>

=={{header|Swift}}==
<lang swift>let a = [1,2,1,3,2]
let b = [1,2,0,4,4,0,0,0]
println(lexicographicalCompare(a, b)) // this is "less than"</lang>
{{out}}
<pre>
false
</pre>


=={{header|Tcl}}==
=={{header|Tcl}}==