Y
yoyo
let mutable i = 0
let a = fun () -> i
The mutable variable 'i' is used in an invalid way. Mutable variables may
not be captured by closures. Consider eliminating this use of mutation or
using a heap-allocated mutable reference cell via 'ref' and '!'.
why "i" can not use here?
let a = fun () -> i
The mutable variable 'i' is used in an invalid way. Mutable variables may
not be captured by closures. Consider eliminating this use of mutation or
using a heap-allocated mutable reference cell via 'ref' and '!'.
why "i" can not use here?