anchor.diff:                                  (thisPageNumber+1,boundaryPageNumber)
                       pb.Flush(fs)
                       if nextN <> (thisPageNumber+1) then utils.SeekPage(fs, pageSize, nextN)
  -                    nextGeneration.Add(thisPageNumber, k)
  -                    {sofar=0; items=[]; nextPage=nextN; boundaryPage=nextB; overflows=Map.empty}
  +                    {sofar=0; items=[]; nextPage=nextN; boundaryPage=nextB; overflows=Map.empty; nextGeneration=(thisPageNumber,k)::nextGeneration}
   
                   let folder pair st =
                       let (pagenum,k:byte[]) = pair
  
positive.code:                     maybeFlush st |> initParent |> addKeyToParent
  
                  // this is the body of writeParentNodes
                  // TODO this would be much happier if children were already an F# list
                  let fsChildren = (List.ofSeq children) |> List.rev
                  let h = List.head fsChildren
                  let t = List.tail fsChildren
                  let initialState = {sofar=0;items=[];nextPage=startingPageNumber;boundaryPage=startingBoundaryPageNumber;overflows=Map.empty}
                  let middleState = List.foldBack folder t initialState 
                  let finalState = flushParentPage middleState h (nextGeneration.Count=0)
                  let {nextPage=n;boundaryPage=b} = finalState
                  (n,b,nextGeneration)
  
              let rec writeOneLayerOfParentPages next boundary (children:System.Collections.Generic.List<int32 * byte[]>) :int32 =
                  if children.Count > 1 then
                      let (newNext,newBoundary,newChildren) = writeParentNodes children next boundary 
                      writeOneLayerOfParentPages newNext newBoundary newChildren
                  else
                      fst children.[0]
  
              let rootPage = writeOneLayerOfParentPages pageAfterLeaves boundaryAfterLeaves leaves
  
              pageManager.End(token, rootPage)
              rootPage
  
negative.code:             items:(int32*byte[]) list; 
              nextPage:int; 
              boundaryPage:int; 
              nextGeneration:(int32*byte[]) list; 
              overflows:Map<byte[],int32>;
          }
  
  