anchor.diff:               state := fupdate !state curr outg
              yield !state |> ftransf
            else 
  -           r := (!r - 1) }
  +           r := (!r - 1)
  +           yield noVal }
   
     type Sums = { nobs: float; sum: float; sump2: float; sump3: float; sump4: float }
   
  
positive.code: 
  [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]    
  module Stats =
    // -- Experimental window logic 
    // - TODO: 
    //    -- still to do, possibly: prod, min, max, median, quantile, corr, cov
  
    let internal applySeriesProj keyProj (denseProj:float seq -> float seq) (sparseProj:float option seq -> float option seq) 
      (series:Series<'K, float>) : Series<'K, float> =
      
      let newKeys = series.Index.Keys |> keyProj
      
      let makeOptionalSeries x = 
        let newVals = x |> Seq.map OptionalValue.asOption |> sparseProj
        Series(Index.ofKeys newKeys, Vector.ofOptionalValues newVals, series.VectorBuilder, series.IndexBuilder)
  
      let makeSeries x =
        let newVals = x |> denseProj
        Series(Index.ofKeys newKeys, 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
      
    // moving window functions:
  
    // 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 (source: seq<_>) =
      seq {
         let arr = Array.zeroCreate winSz 
         let r = ref (winSz - 1)
  
negative.code:   // end moving window functions
  
    // Helps create an expanding window calculation
    //   winSz is the minimum window size
    //   fupdate takes the current state and incoming observation to the next state
    //   ftransf takes the current state to the current output
    let internal expandingWindowFn winSz initState fupdate ftransf (source: seq<_>) =
      source 
      |> Seq.scan fupdate initState 
      |> Seq.map ftransf 
  
    // Knuth/Welford algorithm for online stats updating
    // see: http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm            
    type Moments = { 
      nobs : float 
      sum  : float 
  