anchor.diff:  let keys = [ for d in 12 .. 20 -> DateTime(2012, 2, d) ]
   inp3 |> Series.sample keys Direction.Forward
   
  -(*
  -Fancy windowing & chunking
  ---------------------------
  -*)
  -
  -let st = Series.ofValues [ 'a' .. 'j' ]
  -st |> Series.windowSize (3, Boundary.Skip) |> Series.map (fun _ v -> String(Array.ofSeq v.Values))
  -st |> Series.windowSize (3, Boundary.AtBeginning) |> Series.map (fun _ v -> String(Array.ofSeq v.Values))
  -st |> Series.windowSize (3, Boundary.AtEnding) |> Series.map (fun _ v -> String(Array.ofSeq v.Values))
  -
  -let concatString = function
  -  | DataSegment.Complete(ser) -> String(ser |> Series.values |> Array.ofSeq)
  -  | DataSegment.Incomplete(ser) -> String(ser |> Series.values |> Array.ofSeq).PadRight(3, '-')
  -
  -st |> Series.chunkSizeInto (3, Boundary.Skip) concatString
  -st |> Series.chunkSizeInto (3, Boundary.AtBeginning) concatString
  -st |> Series.chunkSizeInto (3, Boundary.AtEnding) concatString
  -
  -
   
   (*
   Operations
  
positive.code: let ts = TimeSpan.FromMinutes(5.37)
  let inp = Seq.init 50 (fun i -> dt.Add(TimeSpan(ts.Ticks * int64 i)), i) |> Series.ofObservations
  
  inp.Aggregate(WindowSize(10, Boundary.AtEnding), (fun r -> r), (fun ds -> ds.Data.KeyRange |> fst))
  
  inp |> Series.sampleTimeInto (TimeSpan(1,0,0)) Direction.Forward Series.firstValue
  
negative.code: Calculations and statistics
  ---------------------------
  
  Diff and such
  
  *)
  
  (*** hide ***)
  