Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Write-entire-file/OCaml/write-entire-file.ocaml
Normal file
10
Task/Write-entire-file/OCaml/write-entire-file.ocaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
let write_file filename s =
|
||||
let oc = open_out filename in
|
||||
output_string oc s;
|
||||
close_out oc;
|
||||
;;
|
||||
|
||||
let () =
|
||||
let filename = "test.txt" in
|
||||
let s = String.init 26 (fun i -> char_of_int (i + int_of_char 'A')) in
|
||||
write_file filename s
|
||||
Loading…
Add table
Add a link
Reference in a new issue