I am trying to use Promise.all, which creates a new promise that waits on all its args. This is what I have so far:
let _ =
let _ocaml_promise = Brr_io.Fetch.url ~init:(Brr_io.Fetch.Request.init ()) (Jstr.v "/ocaml-url") in
let _js_promise = Brr_io.Fetch.url ~init:(Brr_io.Fetch.Request.init ()) (Jstr.v "/js-url") in
let _wasm_promise = Brr_io.Fetch.url ~init:(Brr_io.Fetch.Request.init ()) (Jstr.v "/wasm-url") in
let t = Jv.Promise.all @@ Jv.of_list (fun x -> x) [ _ocaml_promise; _js_promies; _wasm_promise ] in
Brr.Console.log [ "hello world" ]
The problem here is the (fun x → x); to use the Jv.of_list, I need sxomething which converts a Fut.t to a Jv.t . How do I do that ?