RosettaCodeData/Task/Input-loop/OCaml/input-loop-1.ml

7 lines
117 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let rec read_lines ic =
try
let line = input_line ic in
line :: read_lines ic
with End_of_file ->
[]