anchor.diff:  
   let randomlySprinkleOnesIntoSolutionRows solutionRows startIdx randomRowIdxs =
   
  -    // TODO: find a way to do this functionally - currently using a reference cell and converting a list of lists to a list of arrays.
  +    // TODO: find a way to do this functionally - currently converting a list of lists to a list of arrays.
   
       let listOfSolutionRowArrays = List.map List.toArray solutionRows
  -    let colIndex = ref startIdx
   
  -    let iterFun = fun randomRowIdx ->
  +    let loop idx randomRowIdx =
           let solutionRowArray = List.nth listOfSolutionRowArrays randomRowIdx
  -        Array.set solutionRowArray !colIndex 1
  -        colIndex := !colIndex + 1
  +        Array.set solutionRowArray (startIdx + idx) 1
   
  -    Seq.iter iterFun randomRowIdxs
  +    Seq.iteri loop randomRowIdxs
   
       List.map Array.toList listOfSolutionRowArrays
   
   let pokeSolutionRowsIntoMatrix matrix (solutionRows: _ list list) randomRowIdxs =
   
  -    // TODO: find a way to do this functionally - currently using a reference cell and converting a list of lists to an array of lists.
  +    // TODO: find a way to do this functionally - currently converting a list of lists to an array of lists.
   
       let matrixAsArrayOfLists = matrix |> Seq.toArray
  -    let fromIndex = ref 0
   
  -    let iterFun = fun toIdx ->
  -        let solutionRow = List.nth solutionRows !fromIndex
  -        Array.set matrixAsArrayOfLists toIdx solutionRow
  -        fromIndex := !fromIndex + 1
  +    let loop idx randomRowIdx =
  +        let solutionRow = List.nth solutionRows idx
  +        Array.set matrixAsArrayOfLists randomRowIdx solutionRow
   
  -    Seq.iter iterFun randomRowIdxs
  +    Seq.iteri loop randomRowIdxs
   
       matrixAsArrayOfLists |> Seq.toList
   
  
positive.code:         return pokeSolutionRowsIntoMatrix matrix solution randomRowIdxs |> to2DArray
      }
  
  [<Test>]
  let ``exact cover problems with no solutions``() =
      let body = fun matrix ->
  
negative.code:     let body = fun matrix ->
          let dlx = new Dlx()
          let solutions = dlx.Solve matrix |> Seq.toList
          let p1 = solutions.Length = 1 |@ sprintf "Expected exactly one solution but got %d" solutions.Length
          let p2 = checkSolutions matrix solutions
          p1 .&. p2
      let arbMatrix = fromGen genMatrixOfIntWithSingleSolution
      let property = forAll arbMatrix body
      Check.One (config, property)
  