anchor.diff:      { state with sum = sum; sump2 = sump2; sump3 = sump3; sump4 = sump4 }
   
     let internal initSumsSparse moment (init: float option []) =
  -    init |> Seq.filter Option.isSome |> Seq.map Option.get |> Seq.toArray |> (initSumsDense moment)
  +    init 
  +    |> Seq.filter Option.isSome 
  +    |> Seq.map Option.get 
  +    |> Seq.toArray 
  +    |> (initSumsDense moment)
   
     let internal updateSumsSparse moment state curr outg = 
       match curr, outg with
  
positive.code:   // - TODO: 
    //    -- still to do, possibly: median, percentile, min, max, corr, cov
  
    let internal applySeriesProj (denseProj:float seq -> float seq) (sparseProj:float option seq -> float option seq) 
      (series:Series<'K, float>) : Series<'K, float> =
      
      let makeOptionalSeries x = 
        let newVals = x |> Seq.map OptionalValue.asOption |> sparseProj
        Series(series.Index, Vector.ofOptionalValues newVals, series.VectorBuilder, series.IndexBuilder)
  
      let makeSeries x =
        let newVals = x |> denseProj
        Series(series.Index, Vector.ofValues newVals, series.VectorBuilder, series.IndexBuilder)
  
      match series.Vector.Data with
      | VectorData.DenseList x  -> makeSeries x
      | VectorData.SparseList x -> makeOptionalSeries x
      | VectorData.Sequence x   -> makeOptionalSeries x
      
    // Helps create a moving window calculation
    // nb. adopted from Seq.windowed in F# code base
    //   finit takes the first fully populated window array to an initial state
    //   fupdate takes the current state, incoming observation, and out-going observation to the next state
    //   ftransf takes the current state to the current output
    let internal movingWindowFn winSz finit fupdate ftransf noVal (source: seq<_>) =
      seq {
         let arr = Array.zeroCreate winSz 
         let r = ref (winSz - 1)
  
negative.code: 
    let internal applyMovingStatsTransform moment winSz minObs (proj: Sums -> float) series =
      checkWinSz winSz minObs
      let filtProj s = if (int s.nobs) >= minObs then proj s else nan
      let calcSparse = movingWindowFn winSz (initSumsSparse moment) (updateSumsSparse moment) filtProj
      applySeriesProj calcSparse series
  
    let internal variance s =
      let v = (s.nobs * s.sump2 - s.sum * s.sum) / (s.nobs * s.nobs - s.nobs) 
  