Anonymous user
N'th: Difference between revisions
→{{header|OCaml}}: Improving code (considering suggestions from Gabriel Scherer)
(→{{header|Ocaml}}: corrected Ocaml to OCaml) |
(→{{header|OCaml}}: Improving code (considering suggestions from Gabriel Scherer)) |
||
Line 1,510:
let show_nth n =
let sn = string_of_int n in
▲ | x when (n mod 10 = 3) && (n mod 100 <> 13) -> sn ^ "rd"
▲ | _ -> sn ^ "th"
let () =
let f min max =
for i=min to max do
print_string (s ^ " ")
done;
print_newline() in
List.iter (fun (min,max) -> f min max) [ (0,25); (250,265); (1000,1025) ]
</lang>
|