anchor.diff:          )
   
       let batchesOf n =
  -        Seq.ofList >>
  -        Seq.mapi (fun i v -> i / n, v) >>
  -        Seq.groupBy fst >>
  -        Seq.map snd >>
  -        Seq.map (Seq.map snd >> Seq.toList) >>
  -        Seq.toList
  +        Seq.ofList >> Seq.mapi (fun i v -> i / n, v) >>
  +        Seq.groupBy fst >> Seq.map snd >>
  +        Seq.map (Seq.map snd >> Seq.toList) >> Seq.toList
       
       let epoch rnd batchSize rbm xInputs =
           let xRand = permuteRows rnd xInputs
  
positive.code: 
      let permutation (rnd : AbstractRandomNumberGenerator) list =
          list |> List.sortBy (fun element -> rnd.NextDouble())
  
      let permute rnd n = permutation rnd [0..(n-1)]
  
      let permuteRows rnd (M : Matrix<float>) = 
          let rows = permute rnd M.RowCount |> List.map (fun i -> M.Row i)
          DenseMatrix.ofRowVectors rows
  
      let updateWeights rnd rbm (batch : Matrix<float>) =
          let batchSize = float batch.RowCount
  
negative.code:     let transpose (M : Matrix<float>) = M.Transpose()
  
      let addHiddenBiases rbm = Matrix.mapCols (fun _ col -> col + rbm.HiddenBiases)
      let addVisibleBiases rbm = Matrix.mapRows (fun _ row -> row + rbm.VisibleBiases)
  
      let forward rbm v = rbm.Weights * (transpose v) |> addHiddenBiases rbm |> transpose
      let backward rbm h = h * rbm.Weights |> addVisibleBiases rbm
  
      let sumOfRows M = M |> Matrix.sumRowsBy (fun _ row -> row)
      let sumOfSquares M = M |> Matrix.fold (fun acc element -> acc + element * element) 0.0
  
      let activate (rnd : AbstractRandomNumberGenerator) activation xInputs =
  