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

6 lines
113 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
let rec read_lines ic =
try let line = input_line ic in
line :: read_lines ic
with End_of_file ->
[]