Except using lwt instead of promises? orr we could not tie it to anything in particular and have it construct calls to async_map fn (val) so you could do let async_map = Lwt.map at the top of your file, or let async_map fn val = Js.Promise.then_ (fun v => Js.Promise.resolve (fn v)) val.
Or maybe it should transform to bind instead of map?
Except using
lwtinstead of promises? orr we could not tie it to anything in particular and have it construct calls toasync_map fn (val)so you could dolet async_map = Lwt.mapat the top of your file, orlet async_map fn val = Js.Promise.then_ (fun v => Js.Promise.resolve (fn v)) val.Or maybe it should transform to
bindinstead ofmap?