2

I re-defined ref, for example, by mistake. And it replaced the default ref.

Is it possible to remove my definition and restore to the original one without restart?

ca9163d9
  • 27,283
  • 64
  • 210
  • 413

1 Answers1

5
let ref = Microsoft.FSharp.Core.Operators.ref;;
Daniel
  • 47,404
  • 11
  • 101
  • 179
  • Interesting, I tried `let ref x = { contents = x };;` too and `:=` works too. The type is different though. One is `val it : ('a -> 'a ref) = ` while another one is `val ref : x:'a -> Ref<'a>`. – ca9163d9 Feb 07 '14 at 16:17
  • @dc7a9163d9 : Try `let ref x = Microsoft.FSharp.Core.Operators.ref x;;` instead if you want to resolve that discrepancy. – ildjarn Feb 09 '14 at 00:30