anchor.diff:  type SamplerResult = {sampler:Sampler; samples:Sample seq; acceptanceRate: float}
   
   /// An immutable state of Filzbach MCMC sampler.
  -and  Sampler private (logl: Parameters -> float,
  -                      // utilities
  +and  Sampler private (// utilities
                         pall: ParameterDefinition[],
                         // variables
                         metr_k: int,
  
positive.code:         // initialize sampler
          let mutable sampler = Sampler.Create(pp, rng, logl)
          // do burn-in iterations
          for _ in 1..burnCount do sampler <- sampler.Probe(true)
          // collect sampleCount samples
          let mutable countAccepted = 0
          let samples = 
              [
              for _ in 1..sampleCount ->
                  for _ in 1..thinning do
                      sampler <- sampler.Probe(false)
                      if sampler.IsAccepted then countAccepted <- countAccepted + 1
                  {values=Array.copy sampler.Parameters.values; logLikelihood = sampler.LogLikelihood; logPrior = sampler.LogPrior}
              ]
  
negative.code:                     runacc.[ii] <- 0
  
          if (accept) then
              Sampler(pall, metr_k+1, rng, pp.SetValues values, deltas, ltotnew, ptotnew, accept, runalt, runacc)
          else
              Sampler(pall, metr_k+1, rng, pp, deltas, ltotold, ptotold, accept, runalt, runacc)
  
      member x.Parameters = pp
      member x.LogLikelihood = ltotold
  