Skip to content

Instantly share code, notes, and snippets.

@dmitry-a-morozov
Created November 27, 2013 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitry-a-morozov/7679567 to your computer and use it in GitHub Desktop.
Save dmitry-a-morozov/7679567 to your computer and use it in GitHub Desktop.
Why out ref will be an issue
namespace Test
type MyType =
static member AsyncWithRefParams(i : int byref) =
async {
i <- 5
}
module Program =
[<EntryPoint>]
let main _ =
let result = ref 0
MyType.AsyncWithRefParams(result) |> Async.RunSynchronously
printfn "Result: %A" result.Value
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment