anchor.diff:                          else
                               (sofar, first, nextPageNumber, boundaryPageNumber)
   
  -                    let addKeyToParent (sofar, firstChild, nextPageNumber, boundaryPageNumber) = 
  +                    let addKeyToParent args = 
  +                        let (sofar, firstChild, nextPageNumber, boundaryPageNumber) = args
                           if isLastChild then 
                               (sofar, firstChild, nextPageNumber, boundaryPageNumber)
                           else
  
positive.code:                             putKeyWithLength k
  
                  let folder st (pagenum,k:byte[]) =
                      let (i, sofar, firstChild, nextPageNumber, boundaryPageNumber) = st
  
                      let neededEitherWay = 1 + Varint.SpaceNeededFor (int64 k.Length) + Varint.SpaceNeededFor (int64 pagenum)
                      let neededForInline = neededEitherWay + k.Length
  
negative.code:                             (sf1 + sf2, first, nextN, nextB)
  
  
                      // this is the body of the folder function
                      let (_,args) = st
                      let args' = maybeFlush args |> addKeyToParent
                      (i+1,args') 
  
                  // TODO this would be much happier if children were already an F# list
                  let fsChildren = List.ofSeq children
                  let initialArgs = (0,0,startingPageNumber,startingBoundaryPageNumber)
                  let initialState = (0,initialArgs)
                  let finalState = List.fold folder initialState fsChildren
                  let (_,(_,_,n,b)) = finalState
                  (n,b,nextGeneration)
  
              let rec writeOneLayerOfParentPages next boundary (children:System.Collections.Generic.List<int32 * byte[]>) :int32 =
  