Created
July 20, 2017 16:27
-
-
Save b4284/4d4e8784fba2575ba310712e46c387a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open Core | |
| let () = | |
| let unit_str = "y\n" and unit_str_len = 2 in | |
| let buf = Buffer.create 0 in | |
| let rec print_endlessly () = | |
| Out_channel.output_buffer stdout buf; | |
| print_endlessly () | |
| in | |
| let rec grow_buf () = | |
| if Buffer.length buf + unit_str_len < 8192 then | |
| begin | |
| Buffer.add_string buf unit_str; | |
| grow_buf () | |
| end | |
| in | |
| begin | |
| grow_buf (); | |
| print_endlessly (); | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment