Created
January 27, 2015 22:02
-
-
Save Chouser/27306a7cb653a9a11d1c to your computer and use it in GitHub Desktop.
This file contains 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
let slurp filename = | |
let ic = open_in filename in | |
let rec loop out_str = | |
try | |
loop out_str ^ (input_line ic) ^ "\n" | |
with e -> | |
close_in ic; | |
out_str in | |
loop "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment