I am attempting to write some simple code in F#, and i get this error:
Error 1 The mutable variable \'i\' is used in an invalid way. Mutable variables ma
You can't refer to mutables inside a closure, and that includes such constructs as seq{} and async{} blocks.
You could write
let printProcess = async { let i = ref 1 while true do System.Console.WriteLine(!i) i := !i + 1 }
See this blog for some discussion.