/// Counter with F#-only eventtypeSimpleCounter() =letevt=newEvent<int>()
letmutablecount=0/// Increments the counter and triggers /// event after every 10 incrementsmemberx.Increment() =count<-count+1ifcount%10=0thenevt.Trigger(count)
/// Event triggered after every 10 increments/// The value carried by the event is 'int'memberx.IncrementedTenTimes=evt.Publish