langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
8
Task/Input-loop/OCaml/input-loop-3.ocaml
Normal file
8
Task/Input-loop/OCaml/input-loop-3.ocaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
let read_lines f ic =
|
||||
let rec loop () =
|
||||
try f(input_line ic); loop()
|
||||
with End_of_file -> ()
|
||||
in
|
||||
loop()
|
||||
|
||||
read_lines print_endline (open_in Sys.argv.(1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue