Order two numerical lists: Difference between revisions

Line 865:
=={{header|OCaml}}==
 
The built-in comparison operators already do this for lists (although this is not documented):
<lang ocaml># [1;2;1;3;2] < [1;2;0;4;4;0;0;0];;
- : bool = false</lang>
 
(Warning: However, the built-in comparison operators do not do this for arrays:
<lang ocaml># [|1;2;1;3;2|] < [|1;2;0;4;4;0;0;0|];;
- : bool = true</lang>
)
 
But we could write it explicitly this way:
Anonymous user