We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
beginner OCaml student here, I'm teaching it myself. I don't seem to have problem defining functions for variables (in the classic OO-sense), but I am having problem with stdin/stdout in OCaml. I try to define inputString as read_line, then output the string literal "Hello, world" and then the inputString, but only "Hello, world" is printing. I'm not too sure what is going on.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hello World
You are viewing a single comment's thread. Return to all comments →
beginner OCaml student here, I'm teaching it myself. I don't seem to have problem defining functions for variables (in the classic OO-sense), but I am having problem with stdin/stdout in OCaml. I try to define inputString as read_line, then output the string literal "Hello, world" and then the inputString, but only "Hello, world" is printing. I'm not too sure what is going on.