Compare commits

..

No commits in common. "8ea4705c174425e545b4a0c1cac67fe15b340ddf" and "1569132c6c0d0004563bbda53f248a5172bcb9d3" have entirely different histories.

5 changed files with 0 additions and 26 deletions

View File

@ -7,7 +7,3 @@ Some references:
- https://leconjugueur.lefigaro.fr/frlesnombres.php - https://leconjugueur.lefigaro.fr/frlesnombres.php
- https://www.miakinen.net/vrac/nombres - https://www.miakinen.net/vrac/nombres
- https://www.dcode.fr/ecriture-nombre-lettres - https://www.dcode.fr/ecriture-nombre-lettres
Provided as a 1-function library, and a basic command-line utility (`nbr` — will
certainly be renamed to something longer and less likely to name clash).

View File

@ -1,4 +0,0 @@
(executable
(name nbr)
(public_name nbr)
(libraries nombres))

View File

@ -1,18 +0,0 @@
let rec parse_and_print () =
print_string "Entier ? > ";
flush stdout;
input_line stdin |> function
| "q" | "Q" -> ()
| "h" | "?" | "H" ->
print_endline "Je n'accepte que des entiers. 'q' ou 'Q' pour quitter.";
flush stdout;
parse_and_print ()
| str ->
str |> int_of_string
|> (fun i ->
match i with
| i -> i |> Nombres.nombre_of_int |> print_endline
| exception _ -> ())
|> parse_and_print
let () = parse_and_print ()

View File