Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* this does not work as I expected*)
- (* this gives a warning, Lwt.return line warning: Warning 10: this expression should have type unit. *)
- readall fd >>= fun a ->
- ignore(Lwt_io.printf "readall result\n%!");
- ignore(Lwt_io.printf "%s\n%!" a);
- Lwt.return(Lwt_unix.close fd ) ;
- (* this works as expected *)
- Lwt.bind (readall fd)
- (fun a ->
- ignore(Lwt_io.printf "readall result\n%!");
- ignore(Lwt_io.printf "%s\n%!" a);
- Lwt.return(Lwt_unix.close fd );) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement