Maybe it\'s too simple thing to do, but I can\'t find any answer in the web I\'m try to Increment value in F# (like count++ in C#). I don\'t want to use
count++
You can't simulate a postincrement operator but you can do preincrement
let inline (+=) (x : byref<_>) y = x <- x + y let mutable a = 0 &a += 1
or
let inline incv (x : byref<_>) = x <- x + LanguagePrimitives.GenericOne; x let mutable b = 0 incv &b