(* NEW EXAMPLE(this needs a reward Markov chain, WIP. otherwise, you can query for the expected quality of the first successful transmission.)Model repeated transmission attempts over a channel that can be in either a good or bad state. In the end, query the expected number of failed attempts before the first success.On each attempt:- In a good state: - Quality is sampled from gauss(12, 1). - Transmission succeeds with probability 0.85.- In a bad state: - Quality is sampled from gauss(4, 1.5). - Transmission succeeds with probability 0.30.If the transmission succeeds, the program returns that attempt’s sampled quality. If it fails, the channel state is updated.Partially determinizable but finite state. *)let receive = rec receive good => let capacity = if good then uniform(8, 12) else uniform(2, 6) in let quality = uniform(0, capacity) in let success = if good then flip(0.85) else flip(0.30) in if success then quality else let next = if good then flip(0.80) else flip(0.25) in quality + receive nextinreceive true