What I’m trying to say is in addition to the lack of documentation, the API of Async seems keep changing all the time.
The example from SO has syntax error:
let%bind socket = Udp.bind addr in
Another example from discuss.ocaml.org also has syntax error right now:
let () =
Command.async
~summary:"herp"
Command.Spec.(empty)
(fun () -> def)
|> Command.run
File "sendudp.ml", line 23, characters 4-19:
Error: The function applied to this argument has type
?extract_exn:bool -> ?readme:(unit -> string) -> Command.t
This argument cannot be applied without label