CodePlexProject Hosting for Open Source Software
type TrackedValue<'Kind>(v : 'Kind) = let mutable value = v let mutable reads = 0 let mutable writes = 0 member this.Value with get() = reads <- reads + 1 value and set newVal = writes <- writes + 1 value <- newVallet GenericSample1() = let a = TrackedValue(10) let b = TrackedValue(20.0) let c = TrackedValue<_>("Hello") printfn "%d %f %s" a.Value b.Value c.Value
10 20.000000 Hello
Last edited Sep 14, 2011 at 2:31 AM by ttliu2000, version 1
There is no recommended release for this project.