C# async / await method to F#?
I am trying to learn F# and am in the process of converting some C# code to F#. I have the following C# method: public async Task<Foo> GetFooAsync(byte[] content) { using (var stream = new MemoryStream(content)) { return await bar.GetFooAsync(stream); } } Where bar is some private field and GetFooAsync returns a Task<Foo> . How does this translate to F#? Here is what I currently have: member public this.GetFooAsync (content : byte[]) = use stream = new MemoryStream(content) this.bar.GetFooAsync(stream) Which returns a Task . In F#, asynchrony is represented by the async computation builder,