anchor.diff:              | IterationsRemaining -> 
                   // iteration index is an intergral constant
                   ()        
  -
               
           /// derivatives of all ports w.r.t. all variables
           let portDerivs =
  
positive.code:                     let delayedPortSeq = revPortSeq.[delaySlice]
  
                      SequenceArgSlice {ArgIdx=addArg delayedPortSeq; SliceDim=sliceDim}
                  | IterationIndex -> IterationsRemaining
                  | IterationsRemaining -> IterationIndex)
  
          let vars = Map.join originalVars varsFromDeriv
  
          let dSpec = {
              Length = spec.Length
              Vars   = vars
              Channels  = ports
          }
  
          //printfn " ================================== derivative spec is\n%A" dSpec
  
          // build derivatives w.r.t. our arguments
          let argIdxDerivExprs = 
  
negative.code:                 // calculate Jacobians w.r.t. all variables
                  value.Expr |> computeWithRootJacobian incomingJacobian)    
              |> Seq.reduce merge
  
          // go through portContents and create actual port contents
          let ports =
  