Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let program =
- Lwt_io.with_file ~mode:Lwt_io.Output "some_code" begin fun oc ->
- let rec forever () =
- Lwt_io.read_line Lwt_io.stdin >>= Lwt_io.write_line oc >>= forever
- in
- Lwt.async (fun () -> forever ());
- Lwt.return_unit
- end
- let () =
- Lwt_main.run program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement