Input loop: Difference between revisions
Content added Content deleted
Line 2,357: | Line 2,357: | ||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
||
<lang ocaml>let rec read_lines ic = |
<lang ocaml>let rec read_lines ic = |
||
try |
|||
let line = input_line ic in |
|||
line :: read_lines ic |
line :: read_lines ic |
||
with End_of_file -> |
with End_of_file -> |