Advertisement
Guest User

Untitled

a guest
May 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.31 KB | None | 0 0
  1. let server_event (from_server, to_server) =
  2.   Lwt_io.read_line from_server >>= fun line ->
  3.   Lwt_io.printl line >>= fun () ->
  4.   Lwt_io.flush Lwt_io.stdout
  5.  
  6. let console_event (from_server, to_server) =
  7.   let%lwt line = Lwt_io.read_line Lwt_io.stdin in
  8.   Lwt_io.printl line;%lwt
  9.   Lwt_io.flush Lwt_io.stdout
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement